Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13254

camel-file - Some Component Parameters have a different behaviour when used with Poll Enrich

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Implemented
    • 2.23.1
    • 3.0.0.RC2
    • camel-core, camel-ftp, eip
    • None
    • Windows 7 Enterprise SP 1, Zulu Java Open JDK 1.8.0_192

    • Unknown

    Description

      Using the following file route definition

      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...");
      

      results in the following behaviour:

      • File consumed from inbox directory - OK
      • File pre-moved to inbox/Staging directory for processing - OK
      • File moved to 
        inbox/Success/${file:name.noext}-${date:now:yyyyMMddHHmmssSSS}.${file:ext}

        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

      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...");
      

      results in the following behaviour:

      • File consumed from inbox directory - OK
      • File pre-moved to inbox/Staging directory for processing - OK
      • File moved to
         inbox/Staging/Success/-${date:now:yyyyMMddHHmmssSSS}/${file:name}

      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

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Tidy Dave David Ferguson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: