Skip to content

Commit 14f6c5b

Browse files
committed
adding some more notes to components section
1 parent 732b1d3 commit 14f6c5b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

components/messenger.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ Concepts
5454
For instance: logging, validating a message, starting a transaction, ...
5555
They are also responsible for calling the next middleware in the chain,
5656
which means they can tweak the envelope, by adding stamps to it or even
57-
replacing it, as well as interrupt the middleware chain.
57+
replacing it, as well as interrupt the middleware chain. Middleware are called
58+
both when a message is originally dispatched and again later when a message
59+
is received from a tansport,
5860

5961
**Envelope**
6062
Messenger specific concept, it gives full flexibility inside the message bus,
@@ -174,6 +176,8 @@ Hence you can inspect the envelope content and its stamps, or add any::
174176

175177
// You could for example add another stamp.
176178
$envelope = $envelope->with(new AnotherStamp(/* ... */));
179+
} else {
180+
// Message was just originally dispatched
177181
}
178182

179183
return $stack->next()->handle($envelope, $stack);

0 commit comments

Comments
 (0)