You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "David Ferguson (JIRA)" <ji...@apache.org> on 2019/02/25 11:50:00 UTC

[jira] [Commented] (CAMEL-13254) Some File Consumer Parameters have a different behaviour when used with Poll Enrich

    [ https://issues.apache.org/jira/browse/CAMEL-13254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16776786#comment-16776786 ] 

David Ferguson commented on CAMEL-13254:
----------------------------------------

This also applies to the camel-ftp component, when used as part of pollEnrich.

> Some File Consumer Parameters have a different behaviour when used with Poll Enrich
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-13254
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13254
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core, eip
>    Affects Versions: 2.23.1
>         Environment: Windows 7 Enterprise SP 1, Zulu Java Open JDK 1.8.0_192
>            Reporter: David Ferguson
>            Priority: Major
>
> Using the following file route definition
> {code:java}
> from("file:data/inbox?fileName=File-1.txt" +
>         "&charset=UTF-8" +
>         "&preMove=Staging" +
>         "&move=Success/${file:name.noext}-${date:now:yyyyMMddHHmmssSSS}.${file:ext}" +
>         "&moveFailed=Failed/${file:name.noext}-${date:now:yyyyMMddHHmmssSSS}.${file:ext}"
> )
>         .log("Finished polling...");
> {code}
> results in the following behaviour:
>  * File consumed from _inbox_ directory - OK
>  * File pre-moved to _inbox/Staging_ directory for processing - OK
>  * File moved to 
> {code:java}
> inbox/Success/${file:name.noext}-${date:now:yyyyMMddHHmmssSSS}.${file:name}{code}
> when processing finished successfully - OK
> This functions as expected.
> Using the *exact same URI definition* with the Content Enricher EIP _pollEnrich_ using the following route
> {code:java}
> from("timer:start?delay=1000")
>         .pollEnrich()
>         .simple("file:data/inbox?fileName=File-1.txt" +
>                 "&charset=UTF-8" +
>                 "&preMove=Staging" +
>                 "&move=Success/${file:name.noext}-${date:now:yyyyMMddHHmmssSSS}.${file:ext}" +
>                 "&moveFailed=Failed/${file:name.noext}-${date:now:yyyyMMddHHmmssSSS}.${file:ext}"
>         )
>         .log("Finished polling...");
> {code}
> results in the following behaviour:
>  * File consumed from _inbox_ directory - OK
>  * File pre-moved to _inbox/Staging_ directory for processing - OK
>  * File moved to
> {code:java}
>  inbox/Staging/Success/-${date:now:yyyyMMddHHmmssSSS}/${file:name}{code}
> - NOT AS EXPECTED
> As the behaviour differs even though the exact same URI is defined for the file consumers, I'd be inclined to regard this as unintended behaviour and thus a bug. What do you guys think?
> This strange behaviour also seems to have been discussed here back in 2016:
> [http://camel.465427.n5.nabble.com/PollEnrich-with-file-language-td5787380.html]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)