This is an automated email from the ASF dual-hosted git repository. dmvolod pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 077dadc574c5185e63e3a4eb75d4a19b71a939a8 Author: Dmitry Volodin <dmvo...@gmail.com> AuthorDate: Fri Apr 10 10:51:40 2020 +0300 Regen --- docs/components/modules/ROOT/pages/mongodb-component.adoc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/components/modules/ROOT/pages/mongodb-component.adoc b/docs/components/modules/ROOT/pages/mongodb-component.adoc index 070f904..0288ab5 100644 --- a/docs/components/modules/ROOT/pages/mongodb-component.adoc +++ b/docs/components/modules/ROOT/pages/mongodb-component.adoc @@ -967,6 +967,7 @@ from("mongodb:myDb?database=flights&collection=cancellations&tailTrackIncreasing Change Streams allow applications to access real-time data changes without the complexity and risk of tailing the MongoDB oplog. Applications can use change streams to subscribe to all data changes on a collection and immediately react to them. Because change streams use the aggregation framework, applications can also filter for specific changes or transform the notifications at will. +The exchange body will contain the full document of any change. To configure Change Streams Consumer you need to specify `consumerType`, `database`, `collection` and optional JSON property `streamFilter` to filter events. @@ -989,7 +990,21 @@ Java configuration: from("mongodb:myDb?consumerType=changeStreams&database=flights&collection=tickets") .routeProperty("streamFilter", "{'$match':{'$or':[{'fullDocument.stringValue': 'specificValue'}]}}") .to("mock:test"); + ------------- +The `changeStreams` consumer type will also return the following OUT headers: + +[width="100%",cols="10%,10%,60%,20%",options="header",] +|======================================================================= +|Header key |Quick constant |Description (extracted from MongoDB API doc) |Data type + +|`CamelMongoDbStreamOperationType` |`MongoDbConstants.STREAM_OPERATION_TYPE` | The type of operation that occurred. Can +be any of the following values: insert, delete, replace, update, drop, rename, dropDatabase, invalidate. |String + +|`_id` |`MongoDbConstants.MONGO_ID` |A document that contains the _id of the document created or modified by the insert, +replace, delete, update operations (i.e. CRUD operations). For sharded collections, also displays the full shard key for +the document. The _id field is not repeated if it is already a part of the shard key. |ObjectId +|======================================================================= == Type conversions