From f2b39ea17dad815cf8f8f99e105368ccb32da03c Mon Sep 17 00:00:00 2001 From: DKravtsov Date: Wed, 8 Dec 2021 00:38:18 +0200 Subject: [PATCH] added example for limit consuming to specific queue / queues --- messenger.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/messenger.rst b/messenger.rst index ee922bf4019..30a4e4423bf 100644 --- a/messenger.rst +++ b/messenger.rst @@ -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`.