Can Axon guarantee a synchronous end-to-end request cycle using a DistributedCommandBus and a Clustering Event Bus?

Here is what I have in mind:

  1. User create a command in the presentation layer in the MVC’s Controller.
  2. The command is sent on a DistributedCommandBus.
  3. The command reaches the Command Handler.
  4. The command handler raises few events.
  5. The events are sent on a Clustering Event Bus that uses RabbitMQ for example.
  6. The event is handled through the multiple different EventListeners.
  7. The control is returned to the MVC’s Controller again.

So basically I want everything to happen synchronously. I have some doubts that this might not be possible, but I want to know what is the limits of synchronous communication using a DistributedCommandBus and a Clustering Event Bus.

Note: I posted this question on stackOverflow if anyone is interested

Axon cannot guarantee this out-of-the-box. It can only guarantee that a command is handled completely (events stored and published), not that events are handled.

If you want to wait for an event handler to have completed, you need to build a mechanism that does exactly that. Alternatively, use a SimpleEventBus instead (not SimpleCommandBus, as suggested on stackoverflow). For the SimpleEventBus, handling is done in the publishing thread, meaning everything is handled when the publication completes.