I suppose I have the following use case:
- I want a synchronous service if possible (in case of machine crash I want to finish it in background, by some other node)
- I want to save something in my database and publish an event to an event stream like kafka or kinesis (which means 2 transactions db + evt stream)
I am stateless with dockers so I don't know if the transaction machine that recovers is the same that died previously. So the question is how do I make sure such a transaction finished?
I was wondering about async transaction but then my service cannot be synchronous, or I would create a transaction with a state and poll it while it gets handled asynchronously. What are common solutions? I just need to achieve eventual consistency