【发布时间】:2017-04-28 07:25:17
【问题描述】:
我正在研究将 mongodb 用于 pub-sub 模型。我浏览了不同的文章,例如 http://tugdualgrall.blogspot.fr/2015/01/how-to-create-pubsub-application-with.html 和 https://jpaljasma.blogspot.com/2013/11/howto-mongodb-tailable-cursors-in-nodejs.html。
我对@987654324@ 上的numberOfRetries 选项有疑问。如果我设置选项{'numberOfRetries': -1},这会确保光标不会超时吗?这意味着即使将文档添加到集合中存在很长的延迟,我也能够将任何新文档插入到上限集合中?
谢谢。
【问题讨论】:
-
这意味着它一直在重试而不是显示没有找到数据。换句话说,就是连续池化。
标签: node.js mongodb capped-collections