Skip to content

Commit ebde5a8

Browse files
[Messenger] Add TransportNamesStamp tip
1 parent dc5e1a7 commit ebde5a8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

messenger.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,20 @@ to multiple transports:
339339
from ``Notification``, both the routing for ``Notification`` and
340340
``SmsNotification`` will be used.
341341

342+
.. tip::
343+
344+
You can define and override the transport that a message is using at
345+
runtime by using the
346+
:class:`Symfony\\Component\\Messenger\\Stamp\\TransportNamesStamp` on
347+
the envelope of the message. This stamp takes an array of transport
348+
name as its only argument. For more information about stamps, see
349+
`Envelopes & Stamps`_.
350+
351+
.. versionadded:: 6.2
352+
353+
The :class:`Symfony\\Component\\Messenger\\Stamp\\TransportNamesStamp`
354+
stamp was introduced in Symfony 6.2.
355+
342356
Doctrine Entities in Messages
343357
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
344358

0 commit comments

Comments
 (0)