-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Messenger] document reset_on_message transport option #15796
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fabpot
added a commit
to symfony/symfony
that referenced
this pull request
Sep 10, 2021
… between 2 messages (lyrixx) This PR was merged into the 5.4 branch. Discussion ---------- [Mesenger] Add support for reseting container services between 2 messages | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | | License | MIT | Doc PR | symfony/symfony-docs#15796 Without this patch, services are not resetted. For example Monolog Finger Cross handler is never reset nor flushed. So if the first message trigger and "error" level message, all others message will log and overflow the buffer. So, when a transport is **async** (it means it is run in a worker), it's highly preferable to this configuration on Usage with framework: ```yaml framework: messenger: transports: async: dsn: '%env(MESSENGER_TRANSPORT_DSN)%' reset_on_message: true failed: 'doctrine://default?queue_name=failed' sync: 'sync://' ``` Commits ------- 488bb88 [Mesenger] Add support for resetting container services after each messenger message.
94noni
reviewed
Sep 11, 2021
OskarStark
reviewed
Sep 11, 2021
487ef2c
to
47688c8
Compare
@OskarStark & @94noni thanks for the review. I have addressed your comments. |
OskarStark
reviewed
Sep 15, 2021
045fece
to
3f7ebce
Compare
Thanks Grég for this nice contribution! I did some minor rewords while merging, but the core of your contribution remained. Cheers! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
refs symfony/symfony#41163