Skip to content

Commit a231811

Browse files
committed
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
1 parent e9f04f4 commit a231811

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

messenger.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,23 @@ command with the ``--all`` option:
543543

544544
The ``--all`` option was introduced in Symfony 7.1.
545545

546+
When using ``--all``, you can exclude specific receivers using the ``--exclude-receivers``
547+
option (shortcut ``-eq``). This is useful when you want to consume from all receivers
548+
except certain ones (e.g., the failed transport):
549+
550+
.. code-block:: terminal
551+
552+
$ php bin/console messenger:consume --all --exclude-receivers=async_priority_low --exclude-receivers=failed
553+
554+
.. versionadded:: 7.4
555+
556+
The ``--exclude-receivers`` option was introduced in Symfony 7.4.
557+
558+
.. note::
559+
560+
The ``--exclude-receivers`` option can only be used together with ``--all``.
561+
Also, you cannot exclude all receivers.
562+
546563
Messages that take a long time to process may be redelivered prematurely because
547564
some transports assume that an unacknowledged message is lost. To prevent this
548565
issue, use the ``--keepalive`` command option to specify an interval (in seconds;

0 commit comments

Comments
 (0)