@@ -89,14 +89,13 @@ that will do the required processing for your message::
8989 }
9090 }
9191
92- Envelope
93- --------
92+ Adding Metadata to Messages (Envelopes)
93+ ---------------------------------------
9494
95- The notion of an envelope is a concept that helps add context around the
96- messages. An envelope is a message and a set of data. From a user's perspective, this
97- allows you to set some configuration around the message. For example, to set the serialization
98- groups used when the message goes through the transport layer, wrap your message
99- in an ``Envelope `` and add some ``SerializerConfiguration ``::
95+ If you need to add metadata or some configuration to a message, wrap it with the
96+ :class: `Symfony\\ Component\\ Messenger\\ Envelope ` class. For example, to set the
97+ serialization groups used when the message goes through the transport layer, use
98+ the ``SerializerConfiguration `` envelope::
10099
101100 use Symfony\Component\Messenger\Envelope;
102101 use Symfony\Component\Messenger\Transport\Serialization\SerializerConfiguration;
@@ -129,8 +128,7 @@ marker, like this::
129128 public function handle($message, callable $next)
130129 {
131130 // $message here is an `Envelope` object, because this middleware
132- // implements the EnvelopeAwareInterface interface. Otherwise,
133- // it would be the "original" message.
131+ // implements the EnvelopeAwareInterface interface.
134132
135133 if (null !== $message->get(ReceivedMessage::class)) {
136134 // Message just has been received...
0 commit comments