-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[Messenger] Document the --exclude-receivers
option for messenger:consume
command
#21165
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
Open
OskarStark
wants to merge
3
commits into
symfony:7.4
Choose a base branch
from
OskarStark:document-messenger-exclude-receivers
base: 7.4
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[Messenger] Document the --exclude-receivers
option for messenger:consume
command
#21165
OskarStark
wants to merge
3
commits into
symfony:7.4
from
OskarStark:document-messenger-exclude-receivers
+17
−0
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
…mand - 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`
a231811
to
c0c553c
Compare
--exclude-receivers
option for messenger:consume
command
--exclude-receivers
option for messenger:consume
command--exclude-receivers
option for messenger:consume
command
OskarStark
commented
Jul 9, 2025
OskarStark
commented
Jul 9, 2025
fabpot
added a commit
to symfony/symfony
that referenced
this pull request
Aug 23, 2025
…nsume` command (jbdelhommeau) This PR was merged into the 7.4 branch. Discussion ---------- [Messenger] Add `--exclude-receivers` to `messenger:consume` command | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Docs | symfony/symfony-docs#21165 | License | MIT This PR adds a new `--exclude-receivers` (shortcut `-et`) option to the `messenger:consume` command. This option allows users to exclude specific transports/receivers from being consumed when using the `--all` flag. **What it does and why it's needed:** - When running `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-receivers` option makes this possible. - This improves flexibility and usability for complex Messenger setups. **How it works:** ```bash php bin/console messenger:consume --all --exclude-receivers=queues1 --exclude-receivers=queues2 ``` This will consume messages from all transports except `queues1` and `queues2`. **Behavior:** - The `--exclude-queues` option can only be used with `--all`. If used without `--all`, an `InvalidOptionException` is thrown. - If all queues are excluded, a `RuntimeException` is thrown to prevent running the command with no receivers. **Before:** - No way to exclude specific receivers when using `--all`. **After:** - You can now exclude queues with `--exclude-receivers` when using `--all`. **Tests:** - Unit tests have been added to cover the new option, its validation, and edge cases. Commits ------- 9d9a9d8 chore: add exclude-receivers consume parameters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
--exclude-receivers
option--all
flag--all
optionCode PR
--exclude-receivers
tomessenger:consume
command symfony#60979