-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[Messenger] Add option to prevent Redis from deleting messages on rejection #36727
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
Conversation
|
Then there is going to be zero different between calling reject() and calling ack(). This looks suspicious to me. |
|
Maybe that introducing a new |
Whoops, missed the comment. Pretty much yes, rejection and acknowledgement becomes undistinguishable. From my point of view, acknowledgement means "Yup, I've seen this message and I've handled it". Whether it was rejected or handled ok is not possible to pass to Redis as there is no This is similar to how Kafka handles messages, which is what Redis streams are based on conceptually. It is simply a structured log that you go through, acknowledging messages as they come (meaning, "I've read it"). https://redis.io/topics/streams-intro
As you can see in the original,
( |
|
@sroze could you give your opinion on this if you have some spare time? I'd like to adjust the PR to match. Does this need some tests to be added, or will it be good as-is, even with new configuration property EDIT: Also, what EDIT2: I rebased the PR to the current |
src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php
Outdated
Show resolved
Hide resolved
chalasr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #36727 (review)
|
Looks good to me, but I'm not sure this qualifies as a bugfix given it introduces a new option (and thus requires code changes). |
|
I agree with @chalasr, this should target 5.2 (aka master). |
src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php
Outdated
Show resolved
Hide resolved
|
Thank you @Steveb-p. |
Unlessdelete_after_ackconfiguration is set totrue.Introduces
delete_after_rejectconfiguration property.noyes (introduces config property)