Hi,
 
I am new to camel.  I am having problem figuring out what is in the
message body in the following route. I was expecting a File object in
the body according to what camel documents say:
"By default the file endpoint sends a FileMessage which contains a File
as body. If you send this directly to the jms component the jms message
will only contain the File object but not the content."
 
What it prints out is: Body class: [B
 
public class MyRouteBuilder extends RouteBuilder {

    public void configure() {

        from("file:src/data?noop=true").to("jms:test.MyQueue");

        from("jms:test.MyQueue").process(new Processor() {

            public void process(Exchange exchange) {

            Object body = exchange.getIn().getBody();

            System.out.println("Body class: " +
body.getClass().getName());

        }

    });

}

Any idea? 

What I am trying to do is, I have a file poller to poll a folder which
contains MS Word document. The poller sends the message the queue. The
comsumer of the queue will process the Word document etc. What is the
best way to do this?

Thanks for your help!

Brian

 

 

Reply via email to