as Ashwin said, there are a few issues with your approach...notably, you shouldn't define your route in a loop...
Also, if you need to poll from a queue every 300ms...then you can use http://camel.apache.org/content-enricher.html poll enrich , like this... from("timer://myTimer?fixedRate=true&period=300") .pollEnrich("activemq:queue:queue.Q") .to("file:c:/inbox/test"); rumpa wrote: > > Hi Aswin, > > The requirement is to have a standalone consumer that keeps polling every > 300 ms. The message arrives the endpoint properly as i am able to print it > in text. but its weird why am i not able to write it to a file. That too > only the first message that arrives does not get written to the file. > The second message onwards it writes to file perfectly. > ----- Ben O'Day IT Consultant -http://benoday.blogspot.com -- View this message in context: http://camel.465427.n5.nabble.com/Problem-writing-message-to-file-tp4407362p4410859.html Sent from the Camel - Users mailing list archive at Nabble.com.
