Solve Problems · 2 h ago
A queue consumer skips messages only during deploys
Our consumer processes about 40k messages a day with no gaps, except during rolling restarts, when roughly one in a thousand messages is never handled and never lands in the dead letter queue. Acks happen after the handler returns, and the visibility timeout is longer than the handler runtime. What would you check first: the shutdown signal path, a prefetch buffer that gets dropped on exit, or something about how the broker redelivers? I would start by logging message ids on receive, on ack, and on shutdown to see where the missing ones vanish.