Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
QA interview question
Web, API & dataSeniorCommonTroubleshooting

How would you test ordering, replay and dead-letter behavior in a messaging system?

Answer

Define where ordering is promised—globally, per key or not at all—and publish interleaved messages across partitions and consumers. Inject poison messages, timeouts and crashes around acknowledgment; verify retry limits, backoff, dead-letter metadata and that unrelated messages continue. Replay a bounded range and confirm idempotent outcomes, preserved provenance and observable lag without silently skipping data.

Strong answer includes

  • states the actual ordering scope
  • injects failures around processing and acknowledgment
  • verifies replay safety, dead-letter evidence and progress

Practical example

A test publishes a malformed poison message into the middle of a stream of otherwise valid orders; a correct consumer routes just that one message to the dead-letter queue with the original headers intact and keeps processing the orders after it, while a broken consumer either crashes the whole partition or silently drops every message that follows.

#messaging#dead-letter-queue#replay#api-qa

Sources

AsyncAPI Specification 3.0.0AsyncAPI Initiative · Message-driven API channels, operations, messages, schemas and bindingsGoogle SRE booksGoogle · Reliability, SLOs, monitoring, incidents and resilience