Never retry failed message queue consumers in a tight, synchronous loop on the main topic.
A single corrupted message (poison pill) or transient dependency failure halts the entire consumer partition, introducing head-of-line blocking and catastrophic lag.
Use a dedicated Retry Topic with exponential backoff + jitter, bounded maximum attempts (e.g. 3), and route to a Dead Letter Queue (DLQ) with PagerDuty alerts.
Event Producer
Publishes orders
Main Topic
orders.events
Consumer Worker
Throws 503 / DB timeout
Retry Topic (Delay)
orders.retry-10s (Jitter)
Dead Letter Queue
orders.dlq + Alerts
Manual / Batch Replay
Admin fix & re-ingest