Reputation: 1
I have Two independent Spring-Boot Micro-Service one is Command side Another is Query Side Where Command Service Store events in Mongodb and put Events in RabbitMQ then Query Side will Subscribe Queue and Build Query Modal.Now How To achieve Replay event And build Query modal in Axon?? is it possible where both service running independent on different-different node.if not possible then what should i follow to achieve that.
Upvotes: 0
Views: 2209
Reputation: 661
If you choose to use RabbitMQ to distribute events you have to use Axon Subscribing Event Processors
with SubscribableMessageSource
as source - https://docs.axoniq.io/reference-guide/extensions/spring-amqp#reading-events-from-an-amqp-queue
Only Tracking Event Processor
supports replaying of events - https://docs.axoniq.io/reference-guide/configuring-infrastructure-components/event-processing/event-processors#replaying-events
Consider using Axon Server or Kafka to distribute events. They support Tracking processors (and automatically Reply option as well).
You can find some examples here:
...and yes, your Command side can be deployed independently of your Query side (projection). Query side can be re-created from scratch by replying all the events from the past. This will enable blue-green deployments (with projection DB schemas changing).
Best, Ivan
Upvotes: 3