I have a process that is monitoring a mongo db and needs to be notified when there is a change to a table.
It seems like the most logical way to handle this is via a change_stream with a callback that executes when something has changed - that is, the same way a "watch" functions in JavaScript.
Looking at the documentation, I see that the changestream object has iterators, but I don't see the option for a callback. Is there a way to handle this and/or are there any good examples to leverage ?