Hi,
i am trying to c dynamically create change streams. And i am wondering if there is way to avoid create change streams watching the same target?
db.collection('Test' + ).watch().
on('change', data => console.log(new Date(), data));
db.collection('Test' + ).watch().
on('change', data => console.log(new Date(), data));
If there is now some change in Test collection i will receive notification twice. Since I am sending notifications next to SQS i will have duplicated messages.
Is there a way check if change stream with target ‘xy’ already exist, to avoid have same watchers ?
Thank you