Skip to content

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
wants to merge 1 commit into
base: 7.4
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions messenger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,23 @@

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

When using ``--all``, you can exclude specific receivers using the ``--exclude-receivers``

Check failure on line 546 in messenger.rst

View workflow job for this annotation

GitHub Actions / Lint (DOCtor-RST)

Please remove trailing whitespace
option (shortcut ``-eq``). This is useful when you want to consume from all receivers

Check failure on line 547 in messenger.rst

View workflow job for this annotation

GitHub Actions / Lint (DOCtor-RST)

Please remove trailing whitespace
except certain ones (e.g., the failed transport):

.. code-block:: terminal

$ php bin/console messenger:consume --all --exclude-receivers=async_priority_low --exclude-receivers=failed

.. versionadded:: 7.4

The ``--exclude-receivers`` option was introduced in Symfony 7.4.

.. note::

The ``--exclude-receivers`` option can only be used together with ``--all``.
Also, you cannot exclude all receivers.

Messages that take a long time to process may be redelivered prematurely because
some transports assume that an unacknowledged message is lost. To prevent this
issue, use the ``--keepalive`` command option to specify an interval (in seconds;
Expand Down