Query Handling
Query CQRS PHP
Last updated
Was this helpful?
Query CQRS PHP
Last updated
Was this helpful?
Be sure to read before diving in this chapter.
External Query Handlers
are Services available in your dependency container, which are defined to handle Queries
.
Queries are Plain Old PHP Objects:
To send an Query we will be using send
method on QueryBus
.
Query will be delivered to corresponding Query Handler.
Just like with Commands, we may use routing in order to execute queries:
To send an Query we will be using sendWithRouting
method on QueryBus
.
Query will be delivered to corresponding Query Handler.
If you have registered for specific Media Type, then you can tell Ecotone
to convert result of your Query Bus
to specific format.
In order to do this, we need to make use of Metadata
and replyContentType
header.