Is there a way to listen to a MongoDB collection and have a callback gets triggered when a collection has a new document?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Looks like there isn’t a way yet. There is a lot of discussion in the “triggers” JIRA about related topics:
https://jira.mongodb.org/browse/SERVER-124
You can work around this by polling with timestamps or counts, but an event callback would obviously be better.