Hi Radoslav,

> Is it possible to pass some Camel Message Headers to File Endpoint?

Only body of a message is saved to the file. If you want save some
metadata from headers you need to append them to the body of a
message.

You could also consider using the multicast.

from("jms:queue").
setHeader("myMetaData", constant("myMetaDataValue").
multicast().
  to("file:/home/myapp/messages").
  to("direct:insteadOfReadingFromFileComponent").
end();

With solution above you write message to the file component and then
continue processing of the message. This is also more efficient
solution since you skip reading message from the file system (instead
you operate on the instance that is already in the Camel JVM memory).

Cheers.

-- 
Henryk Konsek
http://henryk-konsek.blogspot.com

Reply via email to