You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Otavio Rodolfo Piske (Jira)" <ji...@apache.org> on 2022/11/07 13:34:00 UTC
[jira] [Updated] (CAMEL-18695) camel-resume-api: avoid requiring a processor for offset management
[ https://issues.apache.org/jira/browse/CAMEL-18695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Otavio Rodolfo Piske updated CAMEL-18695:
-----------------------------------------
Priority: Minor (was: Major)
> 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: 3.20.0
>
>
> 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)