@@ -29,12 +29,13 @@ leveraging a Messenger bus for synchronous needs.
29
29
The :method: `Symfony\\ Component\\ Messenger\\ HandleTrait::handle ` method ensures
30
30
there is exactly one handler registered and returns its result.
31
31
32
- Working with command & query buses
32
+ Working with Command & Query Buses
33
33
----------------------------------
34
34
35
35
The Messenger component can be used in CQRS architectures where command & query
36
- buses are central pieces of the application.
37
- See Martin Fowler's `article about CQRS `_ to learn more and :doc: `how to configure multiple buses </messenger/multiple_buses >`.
36
+ buses are central pieces of the application. Read Martin Fowler's
37
+ `article about CQRS `_ to learn more and
38
+ :doc: `how to configure multiple buses </messenger/multiple_buses >`.
38
39
39
40
As queries are usually synchronous and expected to be handled once,
40
41
getting the result from the handler is a common need.
@@ -47,7 +48,6 @@ a ``$messageBus`` property:
47
48
.. code-block :: php
48
49
49
50
// src/Action/ListItems.php
50
-
51
51
namespace App\Action;
52
52
53
53
use App\Message\ListItemsQuery;
@@ -88,7 +88,6 @@ wherever you need a query bus behavior instead of the ``MessageBusInterface``:
88
88
.. code-block :: php
89
89
90
90
// src/MessageBus/QueryBus.php
91
-
92
91
namespace App\MessageBus;
93
92
94
93
use Symfony\Component\Messenger\Envelope;
@@ -115,4 +114,4 @@ wherever you need a query bus behavior instead of the ``MessageBusInterface``:
115
114
}
116
115
}
117
116
118
- .. _ article about CQRS : https://martinfowler.com/bliki/CQRS.html
117
+ .. _ `article about CQRS` : https://martinfowler.com/bliki/CQRS.html
0 commit comments