[ https://issues.apache.org/jira/browse/CAMEL-18695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-18695: -------------------------------- Fix Version/s: 4.x (was: 4.1.0) > camel-resume-api: avoid requiring a processor for offset management > ------------------------------------------------------------------- > > Key: CAMEL-18695 > URL: https://issues.apache.org/jira/browse/CAMEL-18695 > Project: Camel > Issue Type: Improvement > Components: camel-resume-api > Affects Versions: 3.18.3, 3.19.0 > Reporter: Otavio Rodolfo Piske > Assignee: Otavio Rodolfo Piske > Priority: Minor > Fix For: 4.x > > > Currently, in order to update the offsets, the resume API requires a > processor so that the code can do something like: > > {code:java} > File path = exchange.getMessage().getHeader("CamelFilePath", File.class); > exchange.getMessage().setHeader(Exchange.OFFSET, > Resumables.of(path.getParentFile(), path)); > {code} > > However, it would be easier if the code could do something like: > {code:java} > from("file:{{input.dir}}?noop=true&recursive=true") > .resumable().configuration(resumeStrategyConfigurationBuilder.withResumeCache(cache)).offset().auto().to("file:{{output.dir}}");{code} > > In this case, the adapter would take care of handling the offset updates. > Alternatively, for slightly more complex scenarios, it could also allow > something like this: > {code:java} > from("file:{{input.dir}}?noop=true&recursive=true").resumable().configuration(resumeStrategyConfigurationBuilder.withResumeCache(cache)).offset().key(header("AHeaderValue")).value(header("SomeOtherHeader").to("file:{{output.dir}}");{code} > > Offset updates via processors could still be possible using the existing way. -- This message was sent by Atlassian Jira (v8.20.10#820010)