cayasso / mongo-oplog

Watch mongodb oplog in a simple way
380 stars 91 forks source link

How to take care of automatic node fail-over and master changed #63

Open ashishgoyal01 opened 6 years ago

ashishgoyal01 commented 6 years ago

While looking at the connection string which is as : const oplog = MongoOplog('mongodb://127.0.0.1:27017/local', { ns: 'test.posts' }), I can see that you are just setting up the tailing on master node only.

But what in case of master changes ? as we are just setting up the tailing to a default master server, how will it start tailing with new master in this case ??

kdekooter commented 6 years ago

Is it at all possible to connect to a replicaset?