Skip to content
Ironflow is pre-1.0: APIs can change between releases. Pin a version. What is ready →

ironflow outbox

Inspect and manage the transactional outbox (issue #487). Today the only exposed subtree is dlq — operator tooling for the dead-letter table when a publish has failed past its retry budget. See the outbox explanation for background and triage flow.

Terminal window
ironflow outbox <subcommand> [flags]

Subcommands:

SubcommandDescription
dlqList, requeue, or discard rows in the outbox dead-letter table

List rows in the outbox dead-letter table for one environment, newest first. Rows land in this table after the outbox worker exhausts its retry budget: 10 failed publishes of the row’s own, with exponential backoff. A NATS outage does not normally use the budget. The exceptions are a stream leader that lost its peers, which keeps reading as healthy for 10 to 20 seconds, and a storage failure on a single NATS server, described in the outbox explanation. The underlying event row in events is unaffected — only the unpublished NATS delivery is stuck.

--env is required (or set IRONFLOW_ENV). There is no default. Silent defaulting during incident triage could hide rows in the env you actually need to inspect.

Terminal window
ironflow outbox dlq list [flags]

Flags:

FlagShortTypeDefaultDescription
--envstringEnvironment ID (required unless IRONFLOW_ENV is set)
--limitint50Max rows to return (1-500)
--offsetint0Row offset for pagination
--jsonboolfalseOutput as JSON (structured for jq-based triage)
--server-sstringServer URL override

Examples:

Terminal window
# Inspect the DLQ for prod, tab-formatted
ironflow outbox dlq list --env env_default_prod
# With IRONFLOW_ENV set
IRONFLOW_ENV=env_default_prod ironflow outbox dlq list
# Structured output for scripting
ironflow outbox dlq list --env env_default_prod --limit 100 --json | jq '.items[] | {event_id, topic, last_error}'

Move a dead-letter row back to the live outbox table with attempts=0 so the worker picks it up on the next tick. Use this after fixing the root cause (NATS restored, stream recreated, credentials rotated, etc.).

Terminal window
ironflow outbox dlq requeue <event-id> [flags]

Arguments:

ArgumentRequiredDescription
event-idYesThe event_id of the dead-letter entry to requeue

Flags:

FlagShortTypeDefaultDescription
--envstringEnvironment ID (required unless IRONFLOW_ENV is set)
--server-sstringServer URL override

Examples:

Terminal window
ironflow outbox dlq requeue evt_abc123 --env env_default_prod
# Bulk requeue from a list output
ironflow outbox dlq list --env env_default_prod --json \
| jq -r '.items[].event_id' \
| while read id; do ironflow outbox dlq requeue "$id" --env env_default_prod; done

Permanently delete a dead-letter row. The underlying events row is not deleted — only the unpublished outbox entry. Use this when a payload is unrecoverable (oversized, poison, etc.) or when you have confirmed downstream consumers don’t need the event. An events row whose event never got a NATS sequence is lost to every projection rebuild: the discard fails each rebuild in flight in the environment that could see it, and later rebuilds run without the event (projection rebuilds). Destructive; prompts for confirmation unless --yes is passed.

Terminal window
ironflow outbox dlq discard <event-id> [flags]

Arguments:

ArgumentRequiredDescription
event-idYesThe event_id of the dead-letter entry to discard

Flags:

FlagShortTypeDefaultDescription
--envstringEnvironment ID (required unless IRONFLOW_ENV is set)
--yesboolfalseSkip the confirmation prompt
--server-sstringServer URL override

Examples:

Terminal window
ironflow outbox dlq discard evt_abc123 --env env_default_prod # prompts y/N
ironflow outbox dlq discard evt_abc123 --env env_default_prod --yes # non-interactive