The POJO defined in the following route consumes immediately messages
posted on a queue and in consequence is not triggered by the Quartz
timer

                        <camel:from 
uri="quartz://x3sReporting/clientError?cron=0+0/5+9-18+?+*+MON-FRI"/>
                                <camel:doTry>
                                    <camel:bean ref="reportingConsumer" 
method="collectMessages"/>
                                    ...

public class ReportingConsumer {
        
    @Consume(ref = "queueReportingEndpoint") // = x3s:report queue
        public List<Map<String, Object>> collectMessages(List<Map<String,
Object>> received) {
        
        List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
        
                if (received != null) {
                        
                        Log.info("Received exchange : " + received.size());
                        for(Map<String, Object> model : received) {
                                
                                Log.info("Map received : " + model.toString());
                                // Add model received into the result output 
list
                                result.add( model );
                        }
                }
                
                return result;
        }

Question : How can I avoid that the bean consumes immediately messages
from the queue and wait quartz triggering ?

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com

Reply via email to