I’m using official Mongo Driver for dotnet core 3.2.
Anybody have idea if this below is possible?
I want have two Microservices. The first, initiate a Session and Transaction, insert one record in Collection A and publish event in Message Bus with Session metadata (id, …) . The second, listen event from Message Bus, initiate Session again (with metadata), alter one record in Collection B and commit Transaction.
I want implement my Microservices using Domain Driven Design and Clean Architecture. Suppose that I have three Microservices, Product, Stock and Order. The Product only changes Product Collection. The Stock only changes Stock Collection. The Order only changes Order Collection. To perform sale, then get products, change stock and create order. If Mongo Transaction have ID and Mongo Driver allow initiate instance with this ID, then I communicate this ID between Microservices and ensure segregation responsibility between Bounded Contexts.
The transaction timeout configuration is intersting in this scenario.
If this is possible, I programm Microservices in different languages and use Mongo Driver to facilite this.
I think this is a potencial feature. What you say?