From c0c553cdf47f6c7369b94e69a8995fc05e039c70 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Tue, 1 Jul 2025 10:04:59 +0200 Subject: [PATCH 1/3] 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` --- messenger.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/messenger.rst b/messenger.rst index 18fc5e03cec..348df60ff76 100644 --- a/messenger.rst +++ b/messenger.rst @@ -543,6 +543,23 @@ command with the ``--all`` option: The ``--all`` option was introduced in Symfony 7.1. +When using ``--all``, you can exclude specific receivers using the ``--exclude-receivers`` +option (shortcut ``-eq``). This is useful when you want to consume from all receivers +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; From 8c24184243fb15c4859a6539e003c0a6b1446285 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Wed, 9 Jul 2025 08:49:47 +0200 Subject: [PATCH 2/3] Apply suggestion from @OskarStark --- messenger.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messenger.rst b/messenger.rst index 348df60ff76..07eff51579f 100644 --- a/messenger.rst +++ b/messenger.rst @@ -544,7 +544,7 @@ command with the ``--all`` option: The ``--all`` option was introduced in Symfony 7.1. When using ``--all``, you can exclude specific receivers using the ``--exclude-receivers`` -option (shortcut ``-eq``). This is useful when you want to consume from all receivers +option (shortcut ``-eq``). This is useful when you want to consume from all receivers except certain ones (e.g., the failed transport): .. code-block:: terminal From 17c1dae69e1d17edab594fc85fd8430ee987daa4 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Wed, 9 Jul 2025 08:49:54 +0200 Subject: [PATCH 3/3] Apply suggestion from @OskarStark --- messenger.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messenger.rst b/messenger.rst index 07eff51579f..53b97311020 100644 --- a/messenger.rst +++ b/messenger.rst @@ -543,7 +543,7 @@ command with the ``--all`` option: The ``--all`` option was introduced in Symfony 7.1. -When using ``--all``, you can exclude specific receivers using the ``--exclude-receivers`` +When using ``--all``, you can exclude specific receivers using the ``--exclude-receivers`` option (shortcut ``-eq``). This is useful when you want to consume from all receivers except certain ones (e.g., the failed transport):