Red Hat Camel K is no longer supported.
As of June 30, 2025, Red Hat build of Camel K has reached End of Life. The suggested replacements is Red Hat build of Apache Camel. For details about moving, see the Camel K to Camel Quarkus migration guide.第 51 章 MongoDB 源
使用 MongoDB 的文档。
如果启用了 persistentTailTracking 选项,使用者将跟踪上次使用的消息和下一次重新启动,消耗将从该消息中重启。如果启用 persistentTailTracking,则必须提供 tailTrackIncreasingField (默认为可选)。
如果没有启用 persistentTailTracking 选项,使用者将使用整个集合,等待闲置新文档。
51.1. 配置选项 复制链接链接已复制到粘贴板!
下表总结了 mongodb-source
Kamelet 的配置选项:
属性 | Name | 描述 | 类型 | 默认 | Example |
---|---|---|---|---|---|
集合 * | MongoDB Collection | 设置要绑定到此端点的 MongoDB 集合的名称。 | 字符串 | ||
数据库 * | MongoDB Database | 将 MongoDB 数据库的名称设置为目标。 | 字符串 | ||
主机 * | MongoDB Hosts | 以 host:port 格式分隔的 MongoDB 主机地址列表。 | 字符串 | ||
密码 * | MongoDB 密码 | 用于访问 MongoDB 的用户密码。 | 字符串 | ||
用户名 * | MongoDB Username | 用于访问 MongoDB 的用户名。用户名必须存在于 MongoDB 的验证数据库中(身份验证数据库)。默认情况下,MongoDB authenticationDatabase 为 'admin'。 | 字符串 | ||
persistentTailTracking | MongoDB Persistent Tail Tracking | 启用持久性尾部跟踪,这是跟踪系统重启后最后一次消耗的消息的机制。下次系统启动时,端点将从最后停止的滑动记录的点中恢复光标。 | 布尔值 |
| |
tailTrackIncreasingField | MongoDB Tail Track Increasing 字段 | 传入记录中的关联字段,这是提高性质,每次生成时都会用于定位尾部光标。 | 字符串 |
带星号(*)标记的字段是必需的。