Skip to content

On-Demand Replay from Persistent Edges

You can build repeatable, audited on-demand replay in LyftData 3.0 (v3.0.1) by composing three shipped primitives:

  1. A persistent edge or full-fidelity archive lane (file-store, s3, gcs, or azure-blob) partitioned by clean key prefixes.
  2. A dedicated Replay Job or Workflow triggered by a user-generated message, reading only the requested prefix with fingerprinting: false and optionally filtering, reshaping, or targeting a recovered or alternate sink.
  3. A parameterized Trigger published in the Triggers registry so operators can launch bounded replays from the UI (Run a trigger), REST API, or authorized MCP clients (trigger_invoke__<slug>) — audited, role-gated, and with no shell access.
flowchart LR
  accTitle: On-demand replay from a persistent edge using a parameterized Trigger
  accDescr: Live telemetry fans out to both a primary destination and a persistent File Store or cloud object-store archive. On demand, an operator in the UI or an authorized MCP client invokes a parameterized Trigger, which dispatches a tagged message to a dedicated Replay Job or Workflow that reads the requested archive prefix and delivers to the recovered or target destination.

  subgraph live["Live pipeline + persistent archive"]
    src["Source (syslog / OTLP / HTTP)"] --> wf["Live Workflow (Fan Out)"]
    wf --> primary["Primary destination"]
    wf --> store["Persistent edge / archive (file-store, S3, GCS, Azure Blob)"]
  end

  subgraph replay["On-demand replay path"]
    caller["Operator (UI) or Agent (MCP)"] --> trig["Parameterized Trigger (schema-validated, role-gated)"]
    trig -->|"user-generated message (replay.archive)"| rjob["Replay Job / Workflow (fingerprinting: false)"]
    store -->|"prefix read (${msg|job_event.params.prefix})"| rjob
    rjob --> target["Recovered or alternate destination"]
  end

Keeping the live consumer and the Replay Job separate avoids mutating live fingerprint state: the continuous consumer keeps fingerprinting: true (processing each object once during normal operation), while the dedicated Replay Job runs only when triggered and explicitly re-reads the requested prefix.

1. Persist telemetry at a durable edge or archive lane

Section titled “1. Persist telemetry at a durable edge or archive lane”

Write raw or normalized events to a persistent store with predictable time- or source-partitioned prefixes so every replay can target a bounded slice instead of scanning an entire bucket or directory.

For a local or shared filesystem edge, configure a file-store archive output (or attach a file-store Workflow edge as in Tutorial: File-store Roundtrip):

name: archive_syslog_edge
input:
worker-channel:
worker-channel-name: syslog-archive
output:
file-store:
path: /var/lyftdata/archive
object-name:
name: "archive/syslog/${time|now_time_fmt %Y/%m/%d/%H}/batch"
guid-prefix: "-"
guid-suffix: ".jsonl.gz"
disable-object-name-guid: false
preprocessors:
- gzip

Key layout choices that make replay safe and fast:

  • Partition prefixes by source and time window (for example archive/syslog/2026/12/03/10/) so operators can replay a single hour or feed without scanning historical data.
  • Keep GUID suffixes enabled (disable-object-name-guid: false) so concurrent batches never overwrite earlier archive files.
  • Choose the right storage boundary:
    • file-store: local to the Worker host unless mounted on genuine shared storage. Co-locate the archive writer and Replay Job on the same Worker group when using a local disk path.
    • s3, gcs, or azure-blob: accessible across Workers that share credentials and network access to the bucket or container.
  • Protect retention: LyftData edge readers do not delete objects after reading; your storage lifecycle policy controls how long archives remain replayable.

For caller-confirmed durable landing on HTTP intake before archiving, see Transports and Durability — Compose durable intake.

2. Wire a message-triggered Replay Job or Workflow

Section titled “2. Wire a message-triggered Replay Job or Workflow”

Create a dedicated Replay Job whose input listens for a user-generated message carrying a dedicated filter-tag, expands the validated Trigger prefix into object-names, and sends records to the recovered or target destination.

name: replay_syslog_archive
input:
file-store:
path: /var/lyftdata/archive
mode: list-and-download-objects
object-names:
- "${msg|job_event.params.prefix}"
fingerprinting: false
preprocessors:
- extension
trigger:
message:
filter-kind: user
filter-type:
- user-generated
filter-tag: replay.archive
actions:
- add:
output-fields:
replay_invocation_id: "${msg|job_event.invocation_id}"
replay_requested_by: "${msg|job_event.caller.username}"
replay_reason: "${msg|job_event.params.reason||manual}"
output:
http-post:
url: "https://ingest.example.internal/events"
headers:
Authorization: "Bearer ${secret|ingest/replay_token}"
retry:
count: 5
pause: 2s

How this works in LyftData 3.0:

  • Per-invocation prefix expansion: On every matching message trigger, object-store inputs (file-store, s3, gcs, and azure-blob) resolve ${msg|job_event.params...} in object-names (or blob-names for azure-blob) before listing and downloading objects. See Variable Expansion.
  • Static vs. dynamic filtering: include-regex and exclude-regex on object-store inputs are compiled when the Job starts, not per Trigger message. Pass dynamic scope through object-names prefixes, and perform per-event filtering, field normalization, or time-window checks in the actions stage (for example with filter, convert, or Lua script).
  • Keep fingerprinting: false on the Replay Job: Fingerprinting is read once at Job startup and is meant for continuous consumers that must download each object only once. Disabling it on the dedicated Replay Job lets you replay a prefix cleanly without clearing the live consumer’s fingerprint database.
  • Composing a Replay Workflow: When a replay must re-normalize, split, or fan out to both a staging verification sink and a recovered destination, place the message-triggered reader at the entry of a multi-Job Workflow (for example connected over a worker-channel edge on the same Worker) and target that entry Job from the Trigger.
  • Cloud object stores: Swap input.file-store for input.s3, input.gcs, or input.azure-blob using the same trigger.message, mode: list-and-download-objects, and fingerprinting: false pattern (with bucket-name + object-names for S3/GCS, or container-name + blob-names for Azure Blob).

Publish a curated Trigger in the Triggers registry so callers supply only schema-validated parameters instead of editing Job definitions or touching a Worker shell.

Use JSON Schema pattern and minLength on prefix to forbid an empty prefix — an empty object-names list scans the entire store or bucket.

{
"slug": "replay_archive_prefix",
"tenant_id": "default",
"display_name": "Replay archive prefix",
"description": "Replay archived telemetry objects under a validated prefix to the recovery destination.",
"parameter_schema": {
"type": "object",
"properties": {
"prefix": {
"type": "string",
"minLength": 10,
"pattern": "^archive/[a-z0-9/_-]+/$",
"description": "Bounded archive prefix ending with '/', e.g. archive/syslog/2026/12/03/10/"
},
"reason": {
"type": "string",
"minLength": 3,
"maxLength": 200,
"description": "Change ticket or incident reason recorded on replayed events."
}
},
"required": ["prefix", "reason"],
"additionalProperties": false
},
"default_params": {},
"target_job_name": "replay_syslog_archive",
"target_message_tag": "replay.archive",
"publication": {
"mcp": true,
"ui_admin": true,
"ui_user": false
},
"invoke_policy": {
"allow_admin": true,
"allow_user": false
}
}

Publish this definition through POST /api/triggers/publish (or update it later with POST /api/triggers/replay_archive_prefix/revise). Keep ui_user: false and allow_user: false unless non-admin operators should be permitted to launch replays.

4. Run a replay on demand (UI, API, or MCP)

Section titled “4. Run a replay on demand (UI, API, or MCP)”
  1. Open Triggers and select Replay archive prefix.
  2. Enter the validated prefix (for example archive/syslog/2026/12/03/10/) and reason (for example INC-4821 SIEM index recovery).
  3. Select Run and record the returned invocation_id.
  4. Confirm completion in the target Job’s metrics/logs and destination readback.

Invoke POST /api/triggers/replay_archive_prefix/invoke with an idempotency_key so retried HTTP calls do not dispatch duplicate replay runs:

{
"params": {
"prefix": "archive/syslog/2026/12/03/10/",
"reason": "INC-4821 SIEM index recovery"
},
"idempotency_key": "inc-4821-syslog-2026-12-03-10"
}

Inspect the dispatch record with GET /api/trigger-invocations/<invocation_id>.

When publication.mcp is true and the MCP server runs with --max-tool-tier write, authorized agents discover the Trigger as trigger_invoke__replay_archive_prefix:

  • Pass the validated prefix and reason parameters plus _idempotency_key to deduplicate retries.
  • Inspect dispatch status with trigger_invocation_get using the returned invocation_id.
  • Omit retired _wait_timeout_seconds; dynamic Trigger tools are dispatch-only.

See Triggers — Invoke from MCP and MCP Overview for authentication and write-tier controls.

Delivery, deduplication, and evidence boundaries

Section titled “Delivery, deduplication, and evidence boundaries”

Verify every replay with concrete operational checks:

  1. Expect at-least-once delivery: Re-reading objects from a store can duplicate events that already succeeded earlier. Put destination-side idempotency keys, deduplication, or a staging verification index in place before replaying into production sinks.
  2. Keep one reader replica per prefix: Multiple replicas of the same Replay Job reading the same object-names prefix will each list and download the same objects.
  3. Confirm destination receipts before cleanup: Check the Replay Job’s input/output counts and ERROR logs, then verify the expected records arrived at the destination (tagged with replay_invocation_id) before allowing storage retention or cleanup to remove archived objects. See Runtime Evidence and Receipts.
Pattern When to use it Available in
On-demand Replay Workflow + Trigger (this guide) Repeatable, prefix-scoped replay to a recovered or alternate sink; UI, API, or MCP self-service with schema validation and role gating LyftData 3.0 (v3.0.1)
Manual runtime-artifact reset (lyftdata runtime-artifacts clear or Kafka offset rewind) One-off recovery of a stopped live consumer Job over its own edge prefix or topic offsets LyftData 3.0 (v3.0.1); see Reliability — Replay
Built-in turnkey replay tooling (dedicated replay CLI, API, and UI) Native replay workflows managed directly by the control plane without authoring a separate Replay Job Planned for 3.1+