Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
fabpot merged 1 commit intosymfony:masterfromSeldaek:redis-delete-after-ack
Apr 17, 2020

Conversation

Seldaek
Copy link
Member

@SeldaekSeldaek commentedApr 16, 2020
edited
Loading

This allows Messenger to clean up processed messages from memory, avoiding a mem "leak" in redis

QA
Branch?master
Bug fix?no
New feature?yes
Deprecations?no
Tickets#33715
LicenseMIT
Doc PRsymfony/symfony-docs#... TODO - will pile it on tosymfony/symfony-docs#11869 as it kinda binds together and a bigger refactor of the docs here is much needed to avoid all these gotchas

Right now by default a redis transport for messenger will leak memory as all messages stay in redis forever. You can configurestream_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 forstream_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.

azjezz, Toflar, alexander-schranz, and chalasr reacted with thumbs up emoji
@chalasr
Copy link
Member

Should be enough to close#33715.

Copy link
Member

@fabpotfabpot left a 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.

@SeldaekSeldaekforce-pushed theredis-delete-after-ack branch from262252c to7c416a7CompareApril 17, 2020 06:24
@Seldaek
Copy link
MemberAuthor

Fixed tests now, seems the failing ones are unrelated.

@fabpot
Copy link
Member

Thank you@Seldaek.

@plfort
Copy link
Contributor

Does this feature can be backported on 4.4 ?

@stloyd
Copy link
Contributor

@plfort New feature are never backported into already released versions, backported are only bugfixes.

@SeldaekSeldaek deleted the redis-delete-after-ack branchSeptember 1, 2020 07:29
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

@chalasrchalasrchalasr approved these changes

@azjezzazjezzazjezz approved these changes

@srozesrozeAwaiting requested review from sroze

Assignees
No one assigned
Projects
None yet
Milestone
5.1
Development

Successfully merging this pull request may close these issues.

8 participants
@Seldaek@chalasr@fabpot@plfort@stloyd@azjezz@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp