Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle infinite retry #743

Open
RaphaelHerd opened this issue Nov 20, 2022 · 0 comments
Open

How to handle infinite retry #743

RaphaelHerd opened this issue Nov 20, 2022 · 0 comments

Comments

@RaphaelHerd
Copy link

Dear all,

I have a conceptual question: When I setup the queue architecture with a usual exchange, a belonging queue as well as a dead letter exchange and a belonging dead letter queue. Now during runtime, a message is processed by my consumer. The consumer crashes for some reason and the message is in unacked state. This means that the message will not be forwarded to the dead letter exchange. A new consumer comes up, consumes the previously unacked message. The same error occures (maybe someone put a wrong message or message format into the queue). The same procedure will repeat. This will create an infinite loop because every new consumer will crash for the same reason.

Does someone has an idea? I googled a lot and the only thing I found is a retry queue approach and a redelivered flag which does not help. The redelivered flag is 1 if the message is redeliverd. This is useful if the consumer crash or timed out and the message really needs to be reprocessed. But in case of a crash based on wrong input data, an infinite loop will still be there.

Thanks for your effort
Raphael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant