Axon framework and circuit breaker

Hi, I have been exploring axon framework and event sourcing for some days. I have a question now. Is there any possibility to implement circuit breaker pattern using hystrix in event-sourcing design pattern like axon? I have been going through the hystrix as well what I could understand from it, it’s best to use when you have micro-services architecture using REST to communicate with each other, but in case of event-souring we don’t have this scenario.

So my question is circuit breaker pattern is valid for the event-sourcing micro-services architecutre?

Hi Jamal,

Note that Event Sourcing is a mechanism to source a given Domain Model based on the events it has published.
Thus, Event Sourcing means you are setting state to recreate a given model.
What I think you are looking for, is whether the Circuit Breaker pattern makes sense in an Event-Driven Architecture.

As far as I know, the circuit breaker pattern is used to short cut a given communication channel if it’s down and revert it to another service.

Note that in an Event-Driven Architecture, event messages traverse from one place to another not by direct calls, but through a publish-subscribe mechanism.
This makes events more so a pull mechanism.
I’d argue that with the above knowledge the circuit breaker pattern is not a real candidate for this part of the application, as the flow of messages is entirely different.

Know that this does not make the circuit breaker pattern invalid for an Axon application.
Axon does not only have event message, but it also has command and query message.
All three have different routing needs in place and in combination with one another can contribute to a sensible micro-services architecture.

This video by AxonIQ’s CTO, Allard Buijze, might clarify how Axon thinks of messages in an application.

Concluding, I hope this helps you out Jamal!