@@ -368,7 +368,7 @@ Handling Messages Synchronously
368368
369369If a message doesn't:ref: `match any routing rules <messenger-routing >`, it won't
370370be sent to any transport and will be handled immediately. In some cases (like
371- when:ref: ` sending handlers to different transports<messenger-handlers-different-transports> ` ),
371+ when` binding handlers to different transports`_ ),
372372it's easier or more flexible to handle this explicitly: by creating a ``sync ``
373373transport and "sending" messages there to be handled immediately:
374374
@@ -709,7 +709,11 @@ to retry them:
709709 $ php bin/console messenger:failed:retry 20 30 --force
710710
711711 # remove a message without retrying it
712- $ php bin/console messenger:failed:retry 20
712+ $ php bin/console messenger:failed:remove 20
713+
714+ If the messages fails again, it will be re-sent back to the failure transport
715+ due to the normal `retry rules <Retries & Failures >`_. Once the max retry has
716+ been hit, the message will be discarded permanently.
713717
714718.. _messenger-transports-config :
715719
@@ -773,12 +777,17 @@ a table named ``messenger_messages`` (this is configurable) when the transport i
773777first used. You can disable that with the ``auto_setup `` option and set the table
774778up manually by calling the ``messenger:setup-transports `` command.
775779
776- ..caution ::
780+ ..tip ::
781+
782+ To avoid tools like Doctrine Migrations from trying to remove this table because
783+ it's not part of your normal schema, you can set the ``schema_filter `` option:
777784
778- If you use Doctrine Migrations, each generated migration will try to drop
779- the ``messenger_messages `` table and needs to be removed manually. You
780- cannot (yet) use ``doctrine.dbal.schema_filter `` to avoid. See
781- https://github.com/symfony/symfony/issues/31623.
785+ ..code-block ::yaml
786+
787+ # config/packages/doctrine.yaml
788+ doctrine :
789+ dbal :
790+ schema_filter :' ~^(?!messenger_messages)~'
782791
783792 The transport has a number of options:
784793
@@ -842,14 +851,14 @@ Options defined under ``options`` take precedence over ones defined in the DSN.
842851================== =================================== =======
843852table_name Name of the table messenger_messages
844853queue_name Name of the queue (a column in the default
845- table, to use-use one table for
854+ table, to use one table for
846855 multiple transports)
847856redeliver_timeout Timeout before retrying a messages 3600
848857 that's in the queue but in the
849858 "handling" state (if a worker died
850859 for some reason, this will occur,
851860 eventually you should retry the
852- message)
861+ message) - in seconds.
853862auto_setup Whether the table should be created
854863 automatically during send / get. true
855864================== =================================== =======
@@ -875,7 +884,7 @@ a running Redis server (^5.0).
875884
876885 The Redis transport does not support "delayed" messages.
877886
878- A number of options can be configured via the DSNof via the ``options `` key
887+ A number of options can be configured via the DSNor via the ``options `` key
879888under the transport in ``messenger.yaml ``:
880889
881890================== =================================== =======
@@ -1065,9 +1074,7 @@ A handler class can handle multiple messages or configure itself by implementing
10651074 }
10661075 }
10671076
1068- .. _messenger-handlers-different-transports :
1069-
1070- Sending Handlers to Different Transports
1077+ Binding Handlers to Different Transports
10711078~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10721079
10731080Each message can have multiple handlers, and when a message is consumed
@@ -1239,17 +1246,18 @@ collection of middleware (and their order). By default, the middleware configure
12391246for each bus looks like this:
12401247
12411248#. ``add_bus_name_stamp_middleware `` - adds a stamp to record which bus this
1242- message was dispatched into.
1249+ message was dispatched into;
12431250
1244- #. ``dispatch_after_current_bus ``- see:doc: `/messenger/message-recorder `.
1251+ #. ``dispatch_after_current_bus ``- see:doc: `/messenger/message-recorder `;
12451252
1246- #. ``failed_message_processing_middleware `` - sends failed messages to the
1247- :ref: `failure transport <messenger-failure-transport >`.
1253+ #. ``failed_message_processing_middleware `` - processes messages that are being
1254+ retried via the:ref: `failure transport <messenger-failure-transport >` to make
1255+ them properly function as if they were being received from their original transport;
12481256
12491257#. Your own collection ofmiddleware _;
12501258
12511259#. ``send_message `` - if routing is configured for the transport, this sends
1252- messages to that transport and stops the middleware chain.
1260+ messages to that transport and stops the middleware chain;
12531261
12541262#. ``handle_message `` - calls the message handler(s) for the given message.
12551263