Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Tweaks to messenger docs based on feedback from @Tobion#11639
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
44 changes: 26 additions & 18 deletionsmessenger.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -368,7 +368,7 @@ Handling Messages Synchronously | ||
| If a message doesn't :ref:`match any routing rules <messenger-routing>`, it won't | ||
| be sent to any transport and will be handled immediately. In some cases (like | ||
| when`binding handlers to different transports`_), | ||
| it's easier or more flexible to handle this explicitly: by creating a ``sync`` | ||
| transport and "sending" messages there to be handled immediately: | ||
| @@ -709,7 +709,11 @@ to retry them: | ||
| $ php bin/console messenger:failed:retry 20 30 --force | ||
| # remove a message without retrying it | ||
| $ php bin/console messenger:failed:remove 20 | ||
| If the messages fails again, it will be re-sent back to the failure transport | ||
javiereguiluz marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| due to the normal `retry rules <Retries & Failures>`_. Once the max retry has | ||
| been hit, the message will be discarded permanently. | ||
| .. _messenger-transports-config: | ||
| @@ -773,12 +777,17 @@ a table named ``messenger_messages`` (this is configurable) when the transport i | ||
| first used. You can disable that with the ``auto_setup`` option and set the table | ||
| up manually by calling the ``messenger:setup-transports`` command. | ||
| .. tip:: | ||
| To avoid tools like Doctrine Migrations from trying to remove this table because | ||
| it's not part of your normal schema, you can set the ``schema_filter`` option: | ||
| .. code-block:: yaml | ||
| # config/packages/doctrine.yaml | ||
| doctrine: | ||
| dbal: | ||
| schema_filter: '~^(?!messenger_messages)~' | ||
| The transport has a number of options: | ||
| @@ -842,14 +851,14 @@ Options defined under ``options`` take precedence over ones defined in the DSN. | ||
| ================== =================================== ======= | ||
| table_name Name of the table messenger_messages | ||
| queue_name Name of the queue (a column in the default | ||
| table, to use one table for | ||
| multiple transports) | ||
| redeliver_timeout Timeout before retrying a messages 3600 | ||
| that's in the queue but in the | ||
| "handling" state (if a worker died | ||
| for some reason, this will occur, | ||
| eventually you should retry the | ||
| message) - in seconds. | ||
| auto_setup Whether the table should be created | ||
| automatically during send / get. true | ||
| ================== =================================== ======= | ||
| @@ -875,7 +884,7 @@ a running Redis server (^5.0). | ||
| The Redis transport does not support "delayed" messages. | ||
| A number of options can be configured via the DSNor via the ``options`` key | ||
| under the transport in ``messenger.yaml``: | ||
| ================== =================================== ======= | ||
| @@ -1065,9 +1074,7 @@ A handler class can handle multiple messages or configure itself by implementing | ||
| } | ||
| } | ||
| Binding Handlers to Different Transports | ||
weaverryan marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| Each 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 | ||
| for each bus looks like this: | ||
| #. ``add_bus_name_stamp_middleware`` - adds a stamp to record which bus this | ||
| message was dispatched into; | ||
| #. ``dispatch_after_current_bus``- see :doc:`/messenger/message-recorder`; | ||
| #. ``failed_message_processing_middleware`` - processes messages that are being | ||
| retried via the :ref:`failure transport <messenger-failure-transport>` to make | ||
| them properly function as if they were being received from their original transport; | ||
| #. Your own collection of middleware_; | ||
weaverryan marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| #. ``send_message`` - if routing is configured for the transport, this sends | ||
| messages to that transport and stops the middleware chain; | ||
| #. ``handle_message`` - calls the message handler(s) for the given message. | ||
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.