Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[RedisMessengerBridge] Add a delete_after_ack option#36464
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
eea6d80
to262252c
CompareShould be enough to close#33715. |
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.
LGTM to tests are broken.
… clean up processed messages from memory
262252c
to7c416a7
CompareFixed tests now, seems the failing ones are unrelated. |
Thank you@Seldaek. |
Does this feature can be backported on 4.4 ? |
@plfort New feature are never backported into already released versions, backported are only bugfixes. |
Uh oh!
There was an error while loading.Please reload this page.
This allows Messenger to clean up processed messages from memory, avoiding a mem "leak" in redis
Right now by default a redis transport for messenger will leak memory as all messages stay in redis forever. You can configure
stream_max_entries
to automatically trim to a max of X entries, but that means if you have big peaks in messages you might start losing messages which have not been processed.This PR provides an alternative to that, by deleting message as they are processed. This is ideal as it avoids having to find the right number for
stream_max_entries
(do you want to risk losing data or use more memory than needed on average?). The only catch is that if you have multiple groups consuming the same stream, the first one processing a message will delete it, so other groups will not see it. For that reasonsetup()
attempts to detect this and fails hard if it is misconfigured to prevent data loss.