Hi All,
I have created a
java class which using changestream api of mongodb and able to get notification of changes happening in mongodb collection. We need to process this notification data to process the business logic.
I have deployed this java class in the cloud environment where we have four instances of this java class running. Now after
testing i found that these four instances are getting same data.
can anybody suggest me how to get the notification data in all the servers and no two servers will get the same data.
Please help on this.
My java code copied below printing same data in all the servers.
.
Regards
Sanjeev