DLQ: when a message fails processing beyond a retry threshold (due to a bug, corrupt data, or downstream failure), it is moved to a dead-letter queue for manual inspection, alerting, or reprocessing, preventing it from blocking the main queue.
2 / 5
What is the difference between a queue and a topic/pub-sub pattern?
Queue vs pub-sub: in point-to-point queuing, each message is consumed by one worker. In pub-sub (topics), each message is delivered to every subscriber independently. Queues for work distribution; topics for broadcasting events.
3 / 5
What is message acknowledgement (ack) and why is it important?
Ack: the broker retains a message until the consumer acks it. If the consumer crashes before acking, the broker redelivers it to another consumer. This ensures at-least-once delivery and prevents message loss.
4 / 5
What is the purpose of a message TTL (time-to-live)?
Message TTL: if a consumer is down or slow, messages pile up. A TTL lets you discard stale messages (e.g., a real-time price update that is useless after 5 seconds) rather than processing an ever-growing backlog of outdated data.
5 / 5
What is competing consumers pattern?
Competing consumers: multiple workers read from the same queue. The broker delivers each message to only one of them. Adding more workers increases throughput linearly — the canonical way to scale message processing horizontally.