@RetryableTopic submits the updated state of event on retry topic #3113
Unanswered
mayur-msb-7
asked this question in
Q&A
Replies: 1 comment
-
The non-blocking retry goes to a new Kafka topic, in your case it is |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Kafka Community,
Context:
We're implementing a retry mechanism in our service using Spring Kafka. This involves a combination of blocking retries and non-blocking retries via @RetryableTopic.
Requirement:
During event processing, we modify the event's state to track progress and avoid redundant work on retries. The goal is to resume processing from the point of failure on a retry, not from the beginning. For this purpose, we increment a counter within the event data on each successful processing step.
Observation:
Our tests reveal a discrepancy between blocking retries and event state:
Non-blocking retries (via @RetryableTopic): The event published to the retry topic contains the updated state as expected.
![Non Blockingn Retry Logs](https://private-user-images.githubusercontent.com/43692411/311702768-92d24960-9729-4d38-a647-5ce2c5f0a458.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NzYxNTcsIm5iZiI6MTczOTY3NTg1NywicGF0aCI6Ii80MzY5MjQxMS8zMTE3MDI3NjgtOTJkMjQ5NjAtOTcyOS00ZDM4LWE2NDctNWNlMmM1ZjBhNDU4LlBORz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDAzMTczN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMwMjE4Y2M3N2IyODQ3MjJkMTQzNTViMDhlYjQxNTBlNTY4Y2ViMzZlZDJkOTJhMGVhMTZkOGMwOWJkYTM3NTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9Y1HUA0H5_PaF3gpsagbFe49MNrw0uNEu34zaoijjn8)
Blocking retries: The event processed by the retry logic retains the original state, not the updated state. This leads to redundant processing on retries.
![Blocking Retry Logs](https://private-user-images.githubusercontent.com/43692411/311702859-23e3c4a1-61f5-4841-ad6b-27d807e8dd33.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NzYxNTcsIm5iZiI6MTczOTY3NTg1NywicGF0aCI6Ii80MzY5MjQxMS8zMTE3MDI4NTktMjNlM2M0YTEtNjFmNS00ODQxLWFkNmItMjdkODA3ZThkZDMzLlBORz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDAzMTczN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBkNzQwMzVkMDQxOGQ5ZDQ5NDAzZTRlNDZlZWZhZWY3YWI2MDU3NzZlYmYyZGI2NmU1YjEwZDE4NTcyN2Q1NzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.H0Un0UkrGrOTSI2HGYM8TIi6S-PmcJOC6u3VNQz_7Pc)
Question:
We're seeking clarification on this behavior. Is this a known issue, or is there a configuration or approach we've missed to ensure that blocking retries also receive the updated event state?
Expected Outcome:
We aim to achieve consistent behavior where both blocking and non-blocking retries leverage the updated event state on the retry topic, allowing for efficient and non-redundant retries.
Git Repository: https://github.com/mayur-msb-7/kafka-retry
Beta Was this translation helpful? Give feedback.
All reactions