-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Reproduce messages to different transport for retrying #34235
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
Comments
This is very easy to achieve since #34185. You just need to inject a different |
Making this configurable might make sense. What's the use-case? |
The use case is that I consume from a kafka topic and might have to retry the message due to other messages still missing before I can process that very message. So a retry is needed. As Kafka is write-ahead it doesn't make sense to produce the message to the same kafka topic again as this can screw things up in an event stream. Therefor I would need to store the messages to retry somewhere else than in the original kafka topic. Unfortunately I'm currently tied to version 4.3 so I can't use the latest 4.4.x-dev branch of symfony messenger. Any other workaround which works for 4.3 as well? |
Another use case is when you use a queue (like Kafka) that doesn't support delaying of messages. You want to send failed messages to another transport so you can try them again at a later point. To sent them back to Kafka doesn't make sense, because you will get the message back right away. |
The use-cases listed can be solved with #34979. Instead of using different retry-transports, you just disable retry and use different failure-transports. This also seem more appropriate to me as retry is meant for automatic retry (which only makes sense on the same transport). Manual or semi-automated handling of failed messages is a different topic which is fits the failure logic better. |
Thank you for this suggestion. |
Hello? This issue is about to be closed if nobody replies. |
Hey, I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen! |
Description
Currently if an exception occurs during handling a message and there are retries defined for the transport it will get resent to the same transport it came from. It would be great to define the transport to which the message should be reproduced in case of failure.
Example
The text was updated successfully, but these errors were encountered: