LiteBus
Operations

Production Runbook

Production tier: GA

On-call reference for LiteBus v6 durable messaging. Assumes PostgreSQL storage and AMQP or in-process dispatch unless noted.

Quick Triage

SignalLikely causeFirst action
Inbox/outbox depth growingProcessor paused, store down, handler failuresCheck processor pause state; store connectivity; error column
Rows stuck in ProcessingCrash mid-handler, lease not renewedVerify lease expiry; drain and replay; confirm idempotency
NOTIFY degraded (PostgreSQL)Listener disconnectedWork signal falls back to poll; check logs for reconnect
Ingress lagSlow accept, backpressureScale consumers; check store latency; prefetch settings
Health unhealthyMissing probes or schema driftList manifest probes; run schema validate

Stuck Processing Rows

  1. Confirm processor is running (EnableInboxProcessor / hosted service started).
  2. Check lease_expires_at and lease_owner. Expired leases are reclaimable on next poll.
  3. POST management .../processor/drain (see Operations and management).
  4. Stop host gracefully after drain completes.
  5. If row remains stuck with valid lease, investigate worker holding lease; terminate worker or wait for expiry.
  6. Replay from dead-letter or failed status after fixing root cause.

Dead-Letter Replay

  1. Query dead-letter rows via the management API or SQL (status = DeadLettered).
  2. Fix the handler or downstream dependency.
  3. Use POST /litebus/inbox/messages/requeue-dead-letters or the matching outbox route. The endpoint pages through the store manager and applies the configured operator policy.
  4. Use a new idempotency key only when the application intends to create a new message. Do not edit durable rows directly.
  5. Monitor attempt_count and last_error during replay.

Schema Validate

await schemaManager.ValidateAsync(cancellationToken);

Failure indicates drift from the current component schema. Apply the ordered v6 migration files for an older v6 table, or replace a pre-v6 table after exporting required data. Then run EnsureAsync. See Migration Guide v6 and PostgreSQL schema management.

Processor Drain Sequence (Deployments)

  1. Enable maintenance mode at load balancer (stop new HTTP traffic).
  2. POST /litebus/inbox/processor/drain and /litebus/outbox/processor/drain.
  3. Wait until in-flight count zero (metrics or store query).
  4. Stop application host.
  5. Deploy new version; run schema ensure if needed.
  6. Start host; verify health and probe checks.

NOTIFY Degraded Mode

PostgreSQL work signals listen on channel names registered by inbox/outbox storage. When the listener connection drops, PostgreSqlWorkSignal reconnects after a short delay and falls back to poll interval until notifications resume.

SymptomAction
Higher poll latency onlyAcceptable temporarily; monitor reconnect logs
Repeated reconnect failuresCheck PostgreSQL max connections, firewall, PgBouncer transaction pooling mode

Broker Comparison (Ingress Failure)

BrokerTransient accept failurePoison message
AMQPNack with requeue (unless shutdown cancel)Reject without requeue or DLX policy
KafkaSeek to offset; no commitSkip commit; fix handler; may require manual offset
SQSVisibility timeout backoffDelete or DLQ when RequeueOnFailure = false
Azure Service BusAbandon/defer per adapterDead-letter subqueue

See broker docs: AMQP, Kafka, AWS SQS, Azure Service Bus.

Escalation Data to Collect

  • LiteBus package versions and LiteBusHostManifest probe list
  • Sample stuck row (message_id, status, lease fields, last_error)
  • Processor options (batch size, lease duration, heartbeat interval)
  • Recent deploy and migration changes

Tests Proving Runbook Scenarios

ScenarioTest home
Drain then stopLiteBus.Transport.IntegrationTesting component hosts
Lease reclaimLiteBus.Storage.PostgreSql.IntegrationTests stress tests
NOTIFY reconnectPostgreSqlInboxWorkSignalTests, PostgreSqlOutboxWorkSignalTests
Ingress ack after acceptLiteBus.Inbox.Ingress.UnitTests

On this page