Prompt
Why are workers retrying the same message over and over?
Latest observation
Oct 24, 2026
OpenAI APIWeb search: off
That usually happens when the worker thinks the message failed to process, so the queue/system keeps redelivering it. Common reasons:
-
The worker crashes or times out before acking/committing
- If the process dies, the message is considered unhandled and gets retried.
-
Your handler returns an error
- Any exception, non-2xx response, or failed promise can trigger retry logic.
-
Visibility timeout / lease expires
- In systems like SQS, if processing takes longer than the visibility timeout, the message becomes visible again and another worker picks it up.
-
Retry policy is configured to requeue indefinitely
- Some setups retry forever unless you cap attempts or send to a dead-letter queue.
-
The message is not being marked as completed
- For manual-ack systems (RabbitMQ, Kafka consumers with offset commits, etc.), forgetting the ack/commit means it will be delivered again.
-
The message itself is malformed or causes a deterministic failure
- Example: bad payload, missing field, invalid schema. Every retry fails the same way.
What to check first:
- Worker logs for the exact exception/timeout
- Whether the message is being acked/committed
- Retry count / redelivery count
- Visibility timeout vs processing time
- Dead-letter queue configuration
If you want, I can help you narrow it down if you tell me what queue system you’re using (SQS, RabbitMQ, Kafka, Celery, Sidekiq, etc.) and show the worker code/logs.