camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Matèrne (jhm) <>
Subject AW: How to called the processor
Date Thu, 22 Aug 2013 18:18:57 GMT
> *can i able to do as below, if not then how can i acheive it ?*
> from("direct:start").process(new Processor() {
> 					@Override
> 					public void process(Exchange
> throws Exception {
> 					System.out.println("control in
> processor");
> 					}
> 				});

Sure, you could.
In your first example you create a route, wait 10s for incoming messages and
then exit.
And if a message would come, you could see your console output.

But you havent send a message to your "direct:start" endpoint.
So your little Camel application had not trigger to react on.

That's why your blog uses "timer://timer1?period=1000", which means "every
Another way would sending a message using a ProducerTemplate (see

ProducerTemplate template = context.createProducerTemplate();
template.sendBody("direct:start", "Test Message");


View raw message