[ https://issues.apache.org/jira/browse/CAMEL-13254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16901392#comment-16901392 ]
Claus Ibsen commented on CAMEL-13254: ------------------------------------- Try with Camel 3.0 M2+ > 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: Future > > > 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 (v7.6.14#76016)