Uploaded image for project: 'FUSE ESB'
  1. FUSE ESB
  2. ESB-1630

Mistake in Camel Content Enricher Example in the ESB docs

    Details

    • Type: Documentation
    • Status: Resolved
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 4.4.1-fuse-01-20
    • Fix Version/s: None
    • Component/s: Documentation
    • Labels:
      None

      Description

      See this page
      http://fusesource.com/docs/esb/4.2/eip/MsgTran-Enricher.html

      Which is also presented in the latest
      http://fusesource.com/docs/esb/4.4.1/camel_eip/MsgTran-Enricher.html

      The example which sets a header before calling contentEnrich is wrong, eg
      from("activemq:queue:order")
      .setHeader(Exchange.FILE_NAME, header("orderId"))
      .pollEnrich("file://order/data/additional")
      .to("bean:processOrder");

      This is not currently support in Camel. The ASF camel docs has this warning

      Data from current Exchange not used
      pollEnrich does not access any data from the current Exchange which means when polling it cannot use any of the existing headers you may have set on the Exchange. For example you cannot set a filename in the Exchange.FILE_NAME header and use pollEnrich to consume only that file. For that you must set the filename in the endpoint URI.

      There is a JIRA ticket to improve this in the future
      https://issues.apache.org/jira/browse/CAMEL-4163

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                fbolton Fintan Bolton
                Reporter:
                davsclaus Claus Ibsen
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: