I've slightly modified the JMS example to the following code, but it doesn't
seem to work.

CamelContext cContext = new DefaultCamelContext();
cContext.addRoutes(new RouteBuilder() {
public void configure() {
        from("activemq:MCTestQ:test.topic").process(new Processor() {
                        public void process(Exchange exch) throws Exception {
                                System.out.println("processing from activemq.");
                        }
        }).to("file:temp/camel");
        from("file:temp/camel").process(new Processor() {
                        public void process(Exchange exch) throws Exception {
                                System.out.println("Wrote a message to the 
archive.");
                        }
        });
}
});
CamelTemplate template = new CamelTemplate(cContext);
template.start();
 for (int i = 0; i < 10; i++) {
   template.sendBody("activemq:MCTestQ:test.topic", "Test message: " + i);
 }
Thread.sleep(1000);
template.stop();
}

I can see the messages being sent to the queue in the ActiveMQ admin
console, but I never see any of the System.out messages, nor are any files
created.

I'm still new to the whole camel project, so please tell me what I've
missed, and how I can understand it better.
Thanks!
-- 
View this message in context: 
http://www.nabble.com/Newbie-RouteBuilder-question-help-tp14601037s22882p14601037.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to