I have two simple questions. But i couldn’t find the answer to them.
What is the advantage of SimpleQueryBus as opposed to direct access to read model with JPA repository? If I use a SimpleQueryBus with Point-to-Point queries, will there be conflicts between nodes my application in response?
I think the advantage is the loose coupling.
If you use the query gateway you don’t need to worry about how the query is routed to the
@QueryHandler itself can of course use JPA as part of its implementation but by having the indirection through the query gateway it preserves the “location transparency”.
And you do not get the location transparency when going through direct access.