Hi,
Im trying to manage a distributed transaction using saga. My design is like below.
Order service start saga with CreateOrder command.
Then it gets ItemAddCommands.
And finally it gets ConfirmOrderCommand, in this step it create event called CreditRequestedEvent and publish it to RabbitMQ.
Then Customer service process this event. And then it publish another event called CreditConfirmedEvent and it is processed by the Order service and ends the saga.
Is this kind of implementation ok. And this Customer serivice can be a . Net service.
If you use axon-distributed-commandbus-springcloud module and axon-amqp module,axon will publish the events into amqp queue. Then in your .NET service, you can get it and process, send another event into some queue. And in axon service, get event from this queue and process.
It is a maven module, you just add it in pom file, axon will configure some default for you, like distributed command bus, and dispatch event to AMQP. But you need to configure:
exchange/binding/queue of amqp.
Configure a SpringAMQPMessageSource to listen some queue, related with that queue in step1.
Set event handler to use some event processor, with @ProcessingGroup,
Set the processor(step 3) to use the message source(step 2) to get events.
Iam just trying to use axon, not a export, please correct me if I am wrong. I come up with that from the video. You can get the detail code and explain from that video.