Michal Wolski created CAMEL-23336:
-------------------------------------

             Summary: camel-mongodb - Expose Resume Token (Change Stream)
                 Key: CAMEL-23336
                 URL: https://issues.apache.org/jira/browse/CAMEL-23336
             Project: Camel
          Issue Type: Improvement
          Components: camel-mongodb
            Reporter: Michal Wolski


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? 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to