@@ -709,7 +709,11 @@ to retry them:
709
709
$ php bin/console messenger:failed:retry 20 30 --force
710
710
711
711
# 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.
713
717
714
718
.. _messenger-transports-config :
715
719
@@ -773,12 +777,17 @@ a table named ``messenger_messages`` (this is configurable) when the transport i
773
777
first used. You can disable that with the ``auto_setup `` option and set the table
774
778
up manually by calling the ``messenger:setup-transports `` command.
775
779
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:
784
+
785
+ .. code-block :: yaml
777
786
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.
787
+ # config/packages/doctrine.yaml
788
+ doctrine :
789
+ dbal :
790
+ schema_filter : ' ~^(?!messenger_messages)~ '
782
791
783
792
The transport has a number of options:
784
793
@@ -842,14 +851,14 @@ Options defined under ``options`` take precedence over ones defined in the DSN.
842
851
================== =================================== =======
843
852
table_name Name of the table messenger_messages
844
853
queue_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
846
855
multiple transports)
847
856
redeliver_timeout Timeout before retrying a messages 3600
848
857
that's in the queue but in the
849
858
"handling" state (if a worker died
850
859
for some reason, this will occur,
851
860
eventually you should retry the
852
- message)
861
+ message) - in seconds.
853
862
auto_setup Whether the table should be created
854
863
automatically during send / get. true
855
864
================== =================================== =======
@@ -875,7 +884,7 @@ a running Redis server (^5.0).
875
884
876
885
The Redis transport does not support "delayed" messages.
877
886
878
- A number of options can be configured via the DSN of via the ``options `` key
887
+ A number of options can be configured via the DSN or via the ``options `` key
879
888
under the transport in ``messenger.yaml ``:
880
889
881
890
================== =================================== =======
@@ -1067,7 +1076,7 @@ A handler class can handle multiple messages or configure itself by implementing
1067
1076
1068
1077
.. _messenger-handlers-different-transports :
1069
1078
1070
- Sending Handlers to Different Transports
1079
+ Binding Handlers to Different Transports
1071
1080
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1072
1081
1073
1082
Each message can have multiple handlers, and when a message is consumed
@@ -1243,8 +1252,9 @@ for each bus looks like this:
1243
1252
1244
1253
#. ``dispatch_after_current_bus ``- see :doc: `/messenger/message-recorder `.
1245
1254
1246
- #. ``failed_message_processing_middleware `` - sends failed messages to the
1247
- :ref: `failure transport <messenger-failure-transport >`.
1255
+ #. ``failed_message_processing_middleware `` - processes messages that are being
1256
+ retried via the :ref: `failure transport <messenger-failure-transport >` to make
1257
+ them properly function as if they were being received from their original transport.
1248
1258
1249
1259
#. Your own collection of middleware _;
1250
1260
0 commit comments