I am adding tasks as Docs in a Firestore collection. On the Backend, I have multiple NodeJs stateless instances that process these tasks. All the instances are listening to realtime change in the collection
firestore().collection('Tasks').onSnapshot(startTask, onError);
In this case all the NodeJs instances will be notified when a Task is added. How can I ensure that only one of them process the task? I though about using firebase-queue but it seems that the project is obsolete. Is there a way to do that without extra modules? Running the NodeJs as Firebase function is not an option for me.