@@ -38,7 +38,7 @@ Concepts
38
38
Bus
39
39
---
40
40
41
- The bus is used to dispatch messages. The behaviour of the bus is in its ordered
41
+ The bus is used to dispatch messages. The behavior of the bus is in its ordered
42
42
middleware stack. The component comes with a set of middleware that you can use.
43
43
44
44
When using the message bus with Symfony's FrameworkBundle, the following middleware
@@ -63,9 +63,9 @@ Example::
63
63
64
64
$result = $bus->dispatch(new MyMessage(/* ... */));
65
65
66
- .. note:
66
+ .. note ::
67
67
68
- Every middleware needs to implement the ``MiddlewareInterface`` interface .
68
+ Every middleware needs to implement the ``MiddlewareInterface ``.
69
69
70
70
Handlers
71
71
--------
@@ -89,16 +89,16 @@ that will do the required processing for your message::
89
89
Transports
90
90
----------
91
91
92
- In order to send and receive messages, you will have to configure a transport. An
93
- transport will be responsible of communicating with your message broker or 3rd parties.
92
+ In order to send and receive messages, you will have to configure a transport. A
93
+ transport will be responsible for communicating with your message broker or 3rd parties.
94
94
95
- Your own sender
95
+ Your own Sender
96
96
~~~~~~~~~~~~~~~
97
97
98
98
Using the ``SenderInterface ``, you can easily create your own message sender.
99
- Let's say you already have an ``ImportantAction `` message going through the
100
- message bus and handled by a handler. Now, you also want to send this message as
101
- an email.
99
+ Imagine that you already have an ``ImportantAction `` message going through the
100
+ message bus and being handled by a handler. Now, you also want to send this
101
+ message as an email.
102
102
103
103
First, create your sender::
104
104
@@ -135,13 +135,13 @@ First, create your sender::
135
135
}
136
136
}
137
137
138
- Your own receiver
138
+ Your own Receiver
139
139
~~~~~~~~~~~~~~~~~
140
140
141
141
A receiver is responsible for receiving messages from a source and dispatching
142
142
them to the application.
143
143
144
- Let's say you already processed some "orders" in your application using a
144
+ Imagine you already processed some "orders" in your application using a
145
145
``NewOrder `` message. Now you want to integrate with a 3rd party or a legacy
146
146
application but you can't use an API and need to use a shared CSV file with new
147
147
orders.
@@ -183,10 +183,10 @@ First, create your receiver::
183
183
}
184
184
}
185
185
186
- Receiver and Sender on the same bus
186
+ Receiver and Sender on the same Bus
187
187
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
188
188
189
- To allow us to receive and send messages on the same bus and prevent an infinite
189
+ To allow sending and receiving messages on the same bus and prevent an infinite
190
190
loop, the message bus is equipped with the ``WrapIntoReceivedMessage `` middleware.
191
191
It will wrap the received messages into ``ReceivedMessage `` objects and the
192
192
``SendMessageMiddleware `` middleware will know it should not route these
0 commit comments