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: https://github.com/idugalic/digital-restaurant/tree/master/drestaurant-apps/drestaurant-microservices

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: https://github.com/idugalic/digital-restaurant/blob/master/drestaurant-libs/drestaurant-order/src/main/kotlin/com/drestaurant/order/domain/OrderSaga.kt

Most of the Order service configuration (kafka + axon) is externalized in application.yml: https://github.com/idugalic/digital-restaurant/blob/master/drestaurant-apps/drestaurant-microservices/drestaurant-microservices-command-order/src/main/resources/application.yml

Best,
Ivan

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

Best,
Ivan

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