Integration of an axon based microservice with other microservices based on kafka

Hi everyone

I’m new to axon and I would like to know your opinion about integrating a microservice based on axon with other microservices already implemented using nodeJs and kafka. Specifically, I am considering to start a saga with axon and need other microrservices to participate in that saga.

I have read (Axon and Kafka How does Axon compare to Apache Kafka?) that it is possible to integrate axon with kafka using the axon kafka connector. However, my concern is about listening to kafka events from the axon-saga, performance and other possible issues related to this mixing.

Thank you very much.

Hi @daycith1

I have used an Axon service along with non-Axon services publishing axon domain events to Kafka

When you mention axon-saga I can only visualize a saga in the context of your axon service while other services might collaborate/be integrated between them through Kafka as a regular microservice architecture

In the best case you might react on external events providing domain events for your saga workflow

Hi @habutre

Thanks for your answer.

I think you are right. I think that reacting on external events and providing domain events for the axon-saga workflow could work. But as I mentioned before, my concern is about performance and other possible issues related to this mixing. I guess I have to try it and check if the results and the execution time are acceptable or not.

When you have an architecture with Axon and non-Axon microservices you naturally lose some Axon amenities so I would go with an EDA between them.

If you are already using microservices architecture the performance should not degraded and your concerns regarding issues will not be less or more in any case

That sounds good

@habutre thanks for your support. I hope to try the integration soon.