Skip to content

Commit

Permalink
MongoDB Source Kamelet: Added persistentTailTracking support
Browse files Browse the repository at this point in the history
  • Loading branch information
oscerd committed Jun 25, 2021
1 parent 97df895 commit 0ccad87
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ spec:
definition:
title: "MongoDB Source"
description: |-
Consume documents from MongoDB
Consume documents from MongoDB.
If the persistentTailTracking option will be enabled, the consumer will keep track of the last consumed message and on the next restart, the consumption will restart from that message. In case of persistentTailTracking enabled, the tailTrackIncreasingField must be provided (by default it is optional).
If the persistentTailTracking option won't be enabled, the consumer will consume the whole collection and wait in idle for new documents to consume.
required:
- hosts
- collection
Expand Down Expand Up @@ -46,6 +50,17 @@ spec:
title: MongoDB Database
description: Sets the name of the MongoDB database to target.
type: string
persistentTailTracking:
title: MongoDB Persistent Tail Tracking
description: Enable persistent tail tracking, which is a mechanism to keep track of the last consumed message across system restarts. The next time the system is up, the endpoint will recover the cursor from the point where it last stopped slurping records.
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
tailTrackIncreasingField:
title: MongoDB Tail Track Increasing Field
description: Correlation field in the incoming record which is of increasing nature and will be used to position the tailing cursor every time it is generated.
type: string
dependencies:
- "camel:kamelet"
- "camel:mongodb"
Expand All @@ -62,6 +77,8 @@ spec:
password: "{{password}}"
username: "{{username}}"
database: "{{database}}"
persistentTailTracking: "{{persistentTailTracking}}"
tailTrackIncreasingField: "{{?tailTrackIncreasingField}}"
steps:
- marshal:
json: {}
Expand Down

0 comments on commit 0ccad87

Please sign in to comment.