Skip to content

[Messenger] Add TransportNamesStamp tip #17873

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions messenger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,20 @@ to multiple transports:
from ``Notification``, both the routing for ``Notification`` and
``SmsNotification`` will be used.

.. tip::

You can define and override the transport that a message is using at
runtime by using the
:class:`Symfony\\Component\\Messenger\\Stamp\\TransportNamesStamp` on
the envelope of the message. This stamp takes an array of transport
name as its only argument. For more information about stamps, see
`Envelopes & Stamps`_.

.. versionadded:: 6.2

The :class:`Symfony\\Component\\Messenger\\Stamp\\TransportNamesStamp`
stamp was introduced in Symfony 6.2.

Doctrine Entities in Messages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down