You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/06/24 13:16:00 UTC
[jira] [Resolved] (CAMEL-23336) camel-mongodb - Expose Resume Token (Change Streams Consumer)
[ https://issues.apache.org/jira/browse/CAMEL-23336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-23336.
---------------------------------
Resolution: Fixed
> camel-mongodb - Expose Resume Token (Change Streams Consumer)
> -------------------------------------------------------------
>
> Key: CAMEL-23336
> URL: https://issues.apache.org/jira/browse/CAMEL-23336
> Project: Camel
> Issue Type: New Feature
> Components: camel-mongodb
> Reporter: Michal Wolski
> Priority: Minor
> Fix For: 4.21.0
>
>
> The camel-mongodb component currently handles the resume token initialisation internally, without option to be configured by user.
> The first token is read with the first incoming change document and written to a ChangeStreamsThread.resumeToken variable. This means that any changes before the route startup can not be replayed.
> Letting user define the change stream token in endpoint configuration would allow to implement restart/resume scenarios where a route may be temporarily down and later restarted without losing the ability to continue from the last processed change stream position.
> changeStream docs:
> [mongodb.com/docs/manual/changeStreams/|https://www.mongodb.com/docs/manual/changeStreams/]
> I need some information on how to implement that, as the resume token is a BSON document, that currently looks like this:
> {code:java}
> {
> _data: '8269E097E0000000022B042C0100296E5A1004E8907AEDFD6F4E0C9EA69D134E5DFBCE463C6F7065726174696F6E54797065003C7570646174650046646F63756D656E744B65790046645F696400646623BB24E9484A7B8E165FCF000004'
> } {code}
> Would just accepting JSON representation of it as a resumeToken property in the endpoint config be the right solution?
> For the output, I think that providing the resume token document in an exchange header would be appropriate.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)