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/10/01 08:45:00 UTC
[jira] [Resolved] (CAMEL-13254) camel-file - Some Component
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:all-tabpanel ]
Claus Ibsen resolved CAMEL-13254.
---------------------------------
Fix Version/s: (was: Future)
3.0.0.RC2
Resolution: Implemented
> camel-file - Some Component 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, camel-ftp, eip
> Affects Versions: 2.23.1
> Environment: Windows 7 Enterprise SP 1, Zulu Java Open JDK 1.8.0_192
> Reporter: David Ferguson
> Priority: Minor
> Fix For: 3.0.0.RC2
>
>
> 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:ext}{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}
> Which is 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
(v8.3.4#803005)