We are currently exploring Axon for our transformation project. So far so good, however we wanted to understand how to address following scenario:
Service1 running on 3 PODs, received a REST request to create payment. Create payment work flow consist of multiple commands and events.
- Request received by Service1-POD1, request converted into command (create payment), which creates an event (payment created) and run some projection (query) logic.
- “Payment created” event then calls another command (validate payment)
Question 1: if service1-pod1 goes down during step 2 then we will have “payment created” event in event store. How do we ask other PODs like pod2 or pod3 can pick-up the “payment created” event and run step2?
Question 2: what if during projection (query) logic pod goes down, how do we tell other active PODs to pick up the last event but to also run the query handler associated with that event.
Basically, we are looking for distributed event implementation, means once command created an event then any running instance of an application can pick-up that event and process.