Hi all,

At the moment, we have this route :

onException(RuntimeException.class).handled(false).to("bean:exceptionProcessor").stop();
                from(from).noAutoStartup()
                        .routeId("csvProcessingRoute")
                        .unmarshal(csv)
                        .process(csvProcessor)
                        .split(body())
                                .process(csvMappingProcessor)
                                .process(upsertProcessor)
                        .end()
                        .process(fileDoneProcessor)
                .to("direct:readData");


And this piece of code to consume the route :

ConsumerTemplate serviceObjectsConsumerTemplate =
camelContext.createConsumerTemplate();
                        
while(serviceObjectsConsumerTemplate.receive("direct:readData", 2000) !=
null);

Well what we'd like to do is to keep receiving from the endpoint, but
without a timeout. So actually a normal receive, that waits until something
is there, then process it.
But the problem is, if there is no file left to process, it just hangs with
a receive without timeout.

So is there any workaround for this? ^^

Thanks in advance

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

Reply via email to