Hi there,

I have debug logging enabled for Camel and notice that there's a polling
thread executing every second. What did I do to cause this polling thread to
exist?

The log shows the following:


[tTimeTables])]] Polling Thread] BeanInfo                       DEBUG No
expression available for method: public java.util.Collection
com.classactionpl.flighttimes.InMemoryFlightTimesService.getFlightsForDay(com.classactionpl.flighttimes.FlightTimesService$QueryType,java.lang.String,java.lang.String,java.lang.String,int,int,int,java.util.TimeZone)
which already has a body so ignoring parameter: 1 so ignoring method
[tTimeTables])]] Polling Thread] BeanInfo                       DEBUG No
expression available for method: public abstract java.util.Collection
com.classactionpl.flighttimes.FlightTimesService.getFlightsForDay(com.classactionpl.flighttimes.FlightTimesService$QueryType,java.lang.String,java.lang.String,java.lang.String,int,int,int,java.util.TimeZone)
which already has a body so ignoring parameter: 1 so ignoring method
[tTimeTables])]] Polling Thread] InMemoryFlightTimesService     INFO  New
set of time tables detected
[tTimeTables])]] Polling Thread] BatchProcessor                 DEBUG
receive with timeout: 1000 expired at batch index:0
[tTimeTables])]] Polling Thread] BatchProcessor                 DEBUG
Finished batch size: 100 timeout: 1000 so sending set: []
[tTimeTables])]] Polling Thread] BatchProcessor                 DEBUG
receive with timeout: 1000 expired at batch index:0
[tTimeTables])]] Polling Thread] BatchProcessor                 DEBUG
Finished batch size: 100 timeout: 1000 so sending set: []
[tTimeTables])]] Polling Thread] BatchProcessor                 DEBUG
receive with timeout: 1000 expired at batch index:0
[tTimeTables])]] Polling Thread] BatchProcessor                 DEBUG
Finished batch size: 100 timeout: 1000 so sending set: []


The INFO above shows that the exchange reaches my bean i.e. the route works.
I just don't understand why there's a polling thread running given the
complete config:


        from(
        
"file://target/classes/timetables?noop=true&consumer.delay=60000&consumer.recursive=true")
                .aggregator(new CollectAllAggregationStrategy()).constant(true)
                .process(new TimeTableToTimeTableObject()).to(
                        "bean:inMemoryFlightTimesService?method=setTimeTables");


In case it helps, the bean is defined with singleton scope using Spring.

Thank you for shedding light on the above.

Kind regards,
Christopher
-- 
View this message in context: 
http://www.nabble.com/Unexpected-batch-processor-polling-thread-tp19877186s22882p19877186.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to