camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vishal1981 <vishal.changr...@ericsson.com>
Subject Re: Overriding ScheduledPollConsumer
Date Mon, 11 Feb 2013 22:54:37 GMT
Hi Claus,

Am a little confused - Is this really fixed or am I interpreting this
incorrectly?

I have 2.10.2 and a route as bellow,

from("direct:start")
    	  .pollEnrich("file:myfolder?fileName=file.xml",1000)
    	  .process(new Processor()
    	  {
			@Override
			public void process(Exchange exchange) throws Exception {
				System.out.println("hello "+System.currentTimeMillis());
				
			}
    	  });
When I send it a message via,
ProducerTemplate pt  = camelContext.createProducerTemplate();
	  pt.sendBody("direct:start", "something");

Following happens,
1. If the file is not available an exchange with null body is send to the
processor defined inline. Shouldn't the timeout rather cause an exception?
2. After that one run it goes in a frenzy with messages like below,
TRACE - Scheduled task started on:  
Endpoint[file://myfolder?fileName=file.xml]
TRACE - Cannot start to poll: Endpoint[file://myfolder?fileName=file.xml] as
its suspended
It seems the like the scheduler infact does run, but realizes that it should
not do anything and sleeps again. Shouldn't it just stop completely?

thanks,
Vishal
 




--
View this message in context: http://camel.465427.n5.nabble.com/Overriding-ScheduledPollConsumer-tp4676752p5727372.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message