Skip to content

[Messenger] added example for limit consuming to specific queue / queues #16212

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
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
8 changes: 7 additions & 1 deletion messenger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -604,12 +604,18 @@ transport is always bound to an exchange. By default, the worker consumes from a
queues attached to the exchange of the specified transport. However, there are use
cases to want a worker to only consume from specific queues.

You can limit the worker to only process messages from specific queues:
You can limit the worker to only process messages from specific queue:

.. code-block:: terminal

$ php bin/console messenger:consume my_transport --queues=fasttrack

Or you can limit the worker to only process messages from specific queues:

.. code-block:: terminal

$ php bin/console messenger:consume my_transport --queues=fasttrack1 --queues=fasttrack2

To allow using the ``queues`` option, the receiver must implement the
:class:`Symfony\\Component\\Messenger\\Transport\\Receiver\\QueueReceiverInterface`.

Expand Down