-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[Messenger] Add --exclude-receivers to messenger:consume command
#60979
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
|
@Kocal 🎁 |
src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Tests/Command/ConsumeMessagesCommandTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Tests/Command/ConsumeMessagesCommandTest.php
Outdated
Show resolved
Hide resolved
52da22d to
04d44be
Compare
--exclude-queues consume parameters
3ca4340 to
3379fda
Compare
|
@Kocal @jbdelhommeau Not sure about the naming of the option guys. By default the command consumes from There is the option So I guess we could have 2 options:
Starting with the second option sounds more appropriate to me as it's not bound to some protocol/technologies. Also the current implementation is about |
3379fda to
dcde172
Compare
|
I just push an new version more aligned with @B-Galati feedbacks. |
dcde172 to
4677777
Compare
src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php
Outdated
Show resolved
Hide resolved
4677777 to
0406863
Compare
--exclude-queues consume parameters--exclude-receivers consume parameters
--exclude-receivers consume parameters--exclude-queues to messenger:consume command
--exclude-queues to messenger:consume command--exclude-receivers to messenger:consume command
nicolas-grekas
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.
Please add a line in the changelog file of the component (you can borrow from the PR title)
src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php
Outdated
Show resolved
Hide resolved
1f706e6 to
167c1fe
Compare
Done |
src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php
Outdated
Show resolved
Hide resolved
3fb0e8b to
a2e2161
Compare
|
(please rebase to get rid of the merge commit and trigger tests again) |
309f256 to
a7ee972
Compare
| 7.3 | ||
| --- | ||
|
|
||
| * Add `--exclude-receivers` option to the `messenger:consume command` |
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.
Should be moved to a new 7.4 section.
a7ee972 to
9d9a9d8
Compare
|
Thank you @jbdelhommeau. |
…tion for `messenger:consume` command (OskarStark) This PR was squashed before being merged into the 7.4 branch. Discussion ---------- [Messenger] Document the `--exclude-receivers` option for `messenger:consume` command - Add documentation for the new `--exclude-receivers` option - Show usage example with `--all` flag - Include version annotation for Symfony 7.4 - Add note about requirement to use with `--all` option ### Code PR * symfony/symfony#60979 Commits ------- d252713 [Messenger] Document the `--exclude-receivers` option for `messenger:consume` command
This PR adds a new
--exclude-receivers(shortcut-et) option to themessenger:consumecommand. This option allows users to exclude specific transports/receivers from being consumed when using the--allflag.What it does and why it's needed:
messenger:consume --all, you may want to skip certain transports (example the failed transports) without having to list all the others manually. The new--exclude-receiversoption makes this possible.How it works:
This will consume messages from all transports except
queues1andqueues2.Behavior:
--exclude-queuesoption can only be used with--all. If used without--all, anInvalidOptionExceptionis thrown.RuntimeExceptionis thrown to prevent running the command with no receivers.Before:
--all.After:
--exclude-receiverswhen using--all.Tests: