Using change streams with multi-document transactions

I’m thinking of using MongoDB for an application that requires normalized data because it needs to access most entities separately. So a lot of it transactions will involve multiple documents.

I’d like to use change streams to monitor all transactions and decide whether data needs to be sent to another service. But if several documents are transacted as a unit, they need to be sent as a unit to maintain consistency.

From the MongoDB documentation, it looks like you can open a change stream on the entire database, but change events seem to be triggered separately for each collection. So it looks like a multi-document transaction will trigger several events for different collection. But what I really want is an event for the entire transaction. Is that possible with MongoDB?

If it isn’t, I guess I could make the application duplicate the contents of each transaction to a dedicated collection, and then open a change stream on that collection. But that’s a lot of overhead.

Hi @Denis_Vulinovich1 and welcome to the community!!

We do not have the supported feature as of today. The change stream is still available on the database level.
The following Server Ticket falls in the same line as per your requests. Please keep tracking for further updates.

Also, depending on what your use case is, if you match the transaction ID with the event of the collection to the database. But please note that this would entirely depend on your use case.