I am putting a document in MongoDB with a TTL (Time to Live) and then listen for the delete event using the MongoDB change stream. However, if multiple instances of my NodeJS are deployed in GCP Cloud Run, the event will be received & consumed by all the running instances. How do I ensure that the consumption happens exactly once?
We are using MongoDB Atlas as the database provider here.