@@ -53,15 +53,15 @@ Concepts
53
53
applicable throughout the application and affecting the entire message bus.
54
54
For instance: logging, validating a message, starting a transaction, ...
55
55
They are also responsible for calling the next middleware in the chain,
56
- which means they can tweak the envelope, by adding items to it or even
56
+ which means they can tweak the envelope, by adding stamps to it or even
57
57
replacing it, as well as interrupt the middleware chain.
58
58
59
59
**Envelope **
60
60
Messenger specific concept, it gives full flexibility inside the message bus,
61
61
by wrapping the messages into it, allowing to add useful information inside
62
- through *envelope items *.
62
+ through *envelope stamps *.
63
63
64
- **Envelope Items **
64
+ **Envelope Stamps **
65
65
Piece of information you need to attach to your message: serializer context
66
66
to use for transport, markers identifying a received message or any sort of
67
67
metadata your middleware or transport layer may use.
@@ -76,7 +76,7 @@ When using the message bus with Symfony's FrameworkBundle, the following middlew
76
76
are configured for you:
77
77
78
78
#. :class: `Symfony\\ Component\\ Messenger\\ Middleware\\ LoggingMiddleware ` (logs the processing of your messages)
79
- #. :class: `Symfony\\ Component\\ Messenger\\ Asynchronous \\ Middleware\\ SendMessageMiddleware ` (enables asynchronous processing)
79
+ #. :class: `Symfony\\ Component\\ Messenger\\ Middleware\\ SendMessageMiddleware ` (enables asynchronous processing)
80
80
#. :class: `Symfony\\ Component\\ Messenger\\ Middleware\\ HandleMessageMiddleware ` (calls the registered handler(s))
81
81
82
82
Example::
@@ -166,7 +166,7 @@ Hence you can inspect the envelope content and its stamps, or add any::
166
166
if (null !== $envelope->get(ReceivedStamp::class)) {
167
167
// Message just has been received...
168
168
169
- // You could for example add another item .
169
+ // You could for example add another stamp .
170
170
$envelope = $envelope->with(new AnotherStamp(/* ... */));
171
171
}
172
172
@@ -176,12 +176,12 @@ Hence you can inspect the envelope content and its stamps, or add any::
176
176
177
177
The above example will forward the message to the next middleware with an additional
178
178
stamp *if * the message has just been received (i.e. has the `ReceivedStamp ` stamp).
179
- You can create your own items by implementing :class: `Symfony\\ Component\\ Messenger\\ Stamp\\ StampInterface `.
179
+ You can create your own stamps by implementing :class: `Symfony\\ Component\\ Messenger\\ Stamp\\ StampInterface `.
180
180
181
181
.. note ::
182
182
183
- Any envelope item must be php serializable if going through transport using
184
- the :class: `Symfony\\ Component\\ Messenger\\ Transport\\ Serialization\\ Serializer `
183
+ Any stamp must be serializable using the Symfony Serializer component
184
+ if going through transport using the :class: `Symfony\\ Component\\ Messenger\\ Transport\\ Serialization\\ Serializer `
185
185
base serializer.
186
186
187
187
Transports
0 commit comments