Improve Changestream metadata by including userId(who), action/intent (event name).
This can be done by including meta data in the options for C(R)UD operations!
Something like: User.updateOne({ _id }, { $set: { name: "newName" } }, { $meta: { userId: _id, action: "nameUpdated" })
This is super useful because now changestream can be used to create event store or audit logs, out of the box. I just have to store all the changestream events from the relevant collections. This also makes event driven architecture in micro services super useful. Developers can use this to publish events directly to a message broker such as kafka, where action would be equivalent to topic. This makes sure that events are published at least once to the message broker and also no need to add publishing logic to every database operations!