Atlas Stream Processing extends the aggregation pipeline with stages for processing continuous data streams. These stages combine with existing aggregation stages built in to the default mongod process, enabling you to perform many of the same operations on continuous data as you can perform on data-at-rest. An Atlas Stream Processing pipeline definition cannot exceed 16 MB.
下表列出了 Atlas Stream Processing 特有的聚合管道阶段,以及以修改后的形式存在于 Atlas Stream Processing 中的聚合管道阶段。
注意
有关特定操作符(包括事务语法和示例)的详细信息,请单击该操作符的参考页面链接。
聚合管道阶段 | 用途 |
|---|---|
指定要从中使用消息的流数据源。 | |
根据用户定义的模式验证流的文档。 | |
支持在流处理器中对任意 REST API 终结点进行类似 | |
对指定集合执行左外连接,以筛选“已连接”集合中的文档进行处理。 This version of the existing | |
将文档从流分配到具有用户定义的持续时间和开始时间间隔的窗口。 | |
将文档从流分配到具有用户定义的持续时间的不重叠的连续窗口。 | |
在输入流中对每个活动“会话”运行管道。每个文档会根据其分区和时间戳被分配到一个会话窗口。 | |
在来自输入流的文档上设置元数据字段。此元数据字段可用于执行动态操作,例如在不更改文档正文内容的情况下对文档执行接收器路由。 | |
使用带生存时间的缓存执行查找,以减少对联接集合的重复读取。 | |
在管道内调用 AWS Lambda 函数,可选地将结果传递到下游阶段。 | |
限制流处理器向下游阶段传递数据的速率,以字节或每秒消息数为单位。 | |
指定连接注册表中要向其发出消息的流或时间序列集合。 | |
现有 | |
查询连接注册表中集合上的 MongoDB 向量搜索索引,并将结果附加到每个流媒体文档。 |
支持的聚合管道阶段
Atlas Stream Processing provides several extensions to the core MongoDB Aggregation Pipeline syntax. To learn more about these extensions, see Supported Aggregation Pipeline Stages.
某些核心聚合管道阶段只有嵌套在其他管道阶段中时才受支持。下表显示了哪些聚合管道阶段支持在主管道内使用或嵌套在指定的聚合管道阶段内使用。
聚合阶段 | 在主管道中受支持 | 在 $https 和 $externalFunction 中受支持 | |
|---|---|---|---|
√ | √ | √ | |
√ | √ | √ | |
√ | √ | √ | |
√ | √ | √ | |
√ | √ | ||
√ | √ | ||
√ | √ | ||
√ | √ | ||
√ | √ | ||
√ | √ | ||
√ | √ | ||
√ | √ | ||
√ | √ | ||
√ | |||
√ | |||
√ | |||
√ | |||
√ | |||
√ | |||
√ | |||
√ | |||
√ | |||
√ | |||
√ | |||
√ |
| [1] | (1, 2) Supported with modified syntax. |