If inside a camel bean we use a Producer to get the answer from a distant service which is available from a queue, can we define the timeout that our service must wait before to return an answer ?
ex : @EndpointInject(uri="jms:queue:inout") ProducerTemplate producer; public Incidents getIncidents() { Incidents l = new Incidents(); // Call the distant service (= DAO Service) to get result List<Incident> i = (List<Incident>) producer.requestBody(null); // How CAN I define a timeout here (if possible) ? l.setIncidents(i); return l; } <camel:route> <camel:from uri="jetty: http://localhost:8181?matchOnUriPrefix=true" /> <camel:to uri="cxfbean:reportIncidentServiceBean"/> </camel:route> <camel:route> <camel:from uri="jms:queue:inout" /> <camel:bean ref="reportIncidentDAOService" method="getReports"/> </camel:route> Regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer ***************************** blog : http://cmoulliard.blogspot.com twitter : http://twitter.com/cmoulliard Linkedlin : http://www.linkedin.com/in/charlesmoulliard Apache Camel Group : http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm