Hello everyone !
I have a simple problem but unfortunately I didn't find the solution on the Internet.
I would like to enrich a message with a file's content.
For example like that:
I would like that the log prints the content of myFile.txt.
But, with this code the body of the message (when I call direct:test) is copied on myFile.txt so my log prints the old body (instead of the content of myFile.txt).
I hope to be clear enough...
I'm using Camel 2.6 and Fuse ESB 4.3
You should use pullEnrich() instead of enrich() DSL.
The pollEnrich works just as the enrich however as it uses a Polling Consumer (which is used in the consumer of File endpoint).
You can find more information here