简体   繁体   English

MongoDB changeStreams可以侦听系统级别的集合吗?

[英]Can MongoDB changeStreams listen to system level collections?

With the limited documentation available on MongoDB changestreams which they introduced version 3.6 onwards, I am not able to conclude if MongoDB changestreams let us listen to system collection changes. 由于他们引入了3.6版以上的MongoDB changestreams上的可用文档有限,因此我无法断定MongoDB changestreams是否允许我们监听系统集合的变化。

Currently, I am interested in system.profile collection. 目前,我对system.profile收集感兴趣。

As of MongoDB v4.0, you can't open a change stream on internal database .system.profile collection. 从MongoDB v4.0开始,您无法在内部数据库 .system.profile集合上打开更改流。

The collection is reserved for internal use and is not included in the replica set oplog , and because changestreams rely on the oplog it won't be able to broadcast the change events. 该集合保留供内部使用,并且不包含在副本集oplog中 ,并且由于changestream依赖oplog因此它将无法广播更改事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM