Axon4 - how to implement distributed event handler

Requirement is to deploy two commnad services with common event bus(Kafka). These services should be able to handle events emitted between each other.

For example if service1 apply event e1 then service2 should handle certain aspects in it's own domain and vice- versa.

Hello Prashant,

This sample demonstrates the usage of Kafka to distribute events between services:

In this opinionated example the Order service is interested in events from other services (Restaurant, Customer and Courier which have they own version/understanding of the Order concept). Please have a look at Orders service: Saga:

Most of the Order service configuration (kafka + axon) is externalized in application.yml:


I should mention that we are discussing this topic on another thread as well:!topic/axonframework/WwpUyZOdziE
You have shared some sample application there, with similar requirements (with Kafka).


Right ! would like to mention, the solution provided is working.