Here's a reformatted version of your Stack Overflow question:
I am already familiar with how the @Retry
annotation from Resilience4j works for synchronous functions, but I'm unsure of how to design an Auto Retry mechanism for Kafka calls. Here's the scenario:
- I need to publish a message to Kafka on
topic_1
. - The message is consumed by an external service.
- The external service sends a callback on
topic_2
. - Based on the callback event received on
topic_2
, we decide whether to republish the message totopic_1
or not.
I'm looking for guidance on how to implement Auto Retry for Kafka calls in this scenario. Is there a framework available that can help with this, or should I implement it myself? Any insights or examples would be greatly appreciated.
EDIT:
One more question, @Retry
block the current thread for the time until all retry attempts are exhausted ? I couldn't find this anywhere in documentation.