Notification from MongoDB on data changes

We have a mongo collection in which we store only the exceptions occurring in the application. Is it possible to send some type notification or alert the someone/team that new entry is created in that collection. I know it can be done by writing some code in the application but just wanted to know if there is a way to do it directly from MongoDB.

Thank you.
JW

Hello @Jason_Widener1,

You can use Change Streams - these work with replica set and sharded clusters only:

Change streams allow applications to access real-time data changes without the complexity and risk of tailing the oplog. Applications can use change streams to subscribe to all data changes on a single collection, a database, or an entire deployment, and immediately react to them.

1 Like

Thank you so much. I will try it over the weekend.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.