What is the difference between a changeStream and tailable cursor in MongoDB

前端 未结 2 678
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-15 18:32

I am trying to determine what the difference is between a changestream: https://docs.mongodb.com/manual/changeStreams https://docs.mongodb.com/manual/reference/method/db.collect

2条回答
  •  囚心锁ツ
    2021-02-15 18:40

    With tailable cursor, you follow ALL changes to all collections. With changeStream, you see only changes to the selected collection. Much less traffic and more reliable.

提交回复
热议问题