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 2019/08/06 15:20:00 UTC

[jira] [Resolved] (CAMEL-13060) camel-file component : while doing pollEnrich from a file when noop=true and idempotent is not set, do poll in GenericFilePollingConsumer less (considering timeout)

     [ https://issues.apache.org/jira/browse/CAMEL-13060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-13060.
---------------------------------
    Resolution: Not A Problem

There is an idempotentKey you can use where you can add file timestamp etc.

> camel-file component : while doing pollEnrich from a file when noop=true and idempotent is not set, do poll in GenericFilePollingConsumer less (considering timeout)
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-13060
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13060
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Önder Sezgin
>            Priority: Minor
>
> [https://github.com/onderson/camel/tree/pollenrich_file_noop]
> this unit test is well. 
> however if idempotent is not set(which means true due to noop=true),
> (by changing this line [https://github.com/onderson/camel/commit/36537607c879522917434c547264396fb2cff639#diff-149418967fb132f43ca384f96879ca49R53]
>  
> {code:java}
> simple("file:target/pollenrich?noop=true&include=${in.header.test_file_name}.txt"){code}
> or
> {code:java}
> simple("file:target/pollenrich?noop=true&idempotent=true&include=${in.header.test_file_name}.txt"){code}
> )
>  
> GenericFilePollingConsumer polls quite long as timeout is not set and defaulted to be Long.MAX_VALUE and idempotent is true and ignores file with the same name even if the file is existing and modified after first poll.
> This could be enhanced considering other file attributes...



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)