Prompt
streaming pipeline dead letter queue
Latest observation
Oct 24, 2026
OpenAI APIWeb search: off
A streaming pipeline dead letter queue (DLQ) is a place to send records/messages that cannot be successfully processed by the main streaming flow.
What it does
In a streaming system, some events may fail due to:
- invalid schema / malformed JSON
- missing required fields
- transformation errors
- downstream service outages
- poison messages that always fail
- retry limits exceeded
Instead of dropping those events or stopping the pipeline, you route them to a DLQ for later inspection and reprocessing.
Typical flow
- Message arrives in stream
- Pipeline tries to process it
- If processing succeeds → continue normally
- If processing fails after retries → send to DLQ
Why it’s useful
- Keeps the main pipeline running
- Prevents bad records from blocking good ones
- Preserves failed messages for debugging/auditing
- Enables replay after fixing the issue
Common DLQ storage options
- Kafka topic (common in streaming architectures)
- Amazon SQS / SNS
- AWS S3 / GCS / Azure Blob for batch review
- Database table for operational tracking
- Secondary stream/topic dedicated to failed events
What to store in the DLQ
Usually include:
- original payload
- error message / exception
- processing stage where it failed
- timestamp
- retry count
- correlation/request ID
- metadata like partition/offset, source topic, etc.
Good practices
- Separate DLQ by error type if useful
- Set alerting for DLQ growth spikes
- Keep retention long enough to investigate
- Provide a replay tool/process
- Validate and classify errors before sending to DLQ
- Monitor root causes so DLQ doesn’t become a dump for systematic failures
Example
If a Kafka consumer receives:
{"userId": 123, "amount": "abc"}
and amount must be numeric, the parser may fail. After retrying, the record can be written to a DLQ topic like:
payments-dlq
If you want, I can also show:
- a Kafka DLQ design
- a Spark/Flink/Kafka Streams implementation
- or a cloud architecture diagram for DLQs in streaming pipelines.