Reputation: 21616
We would like to create a retry kafka mechanism for failures. I saw many introduced a way of have.multiple 'retry' topics. Was wondering why cant i simplify the flow by clone the message add into it a retry-counter field and just re-produce it on the same topic until reached X times and then exhausted.
What do I miss with that mechanism?
Upvotes: 2
Views: 3041
Reputation: 1164
Basically you're missing a configurable delay that should be present in retrying strategy. The simple approach you have presented will lead to very high CPU usage during some outage (for example some service you depend on is unavailable for some minutes or hours). The best approach is to have exponential backoff strategy - with each retry you increase a delay after which a message processing is retried again. And this "delivery delay" is something Kafka doesn't support.
Upvotes: 1
Reputation: 108
Not Sure if I understand the question correctly. Nevertheless, I would suggest that you have some Kafka 'retry' strategies.
Upvotes: 0