Yes, I have a set of routes. One of my camel processors does a JMS
request/reply using the org.apache.camel.ProducerTemplate.requestBody(...)
see below. I believe 
1. The Camel request/reply (InOut) 20 sec default timeout occurs. And the
route is terminated. 
2. However, the requestBody is still pending (has not returned, still
listening on the Temporary Reply Queue).
3. DefaultJmsMessageListenerContainer tries to refresh the JMS Connection on
the now defunct Temporary Reply Queue.

Is there a way to set the reply timeout on the
DefaultJmsMessageListenerContainer. Is there a way to set the timeout on
org.apache.camel.ProducerTemplate.requestBody(...) to less than the camel
request/reply (InOut) 20 sec default timeout?  

      public String send(Exchange exchange, String payload) {
                exchange.getIn().setBody(payload, String.class);
                HttpServletRequest req =
exchange.getIn().getBody(HttpServletRequest.class);
                logger.info("Requesting IP address "+ getClientIpAddr(req));
                String jmsURL = "activemq:queue:" + getRequestQueueName() +
"?jmsMessageType=" + getJmsMessageType() + "&replyToType=" +
getReplyToType() + "&concurrentConsumers=" + getConcurrentConsumers();
                logger.info("Remove +++ jms URL " + jmsURL);
                ProducerTemplate pt = 
exchange.getContext().createProducerTemplate();
                String results = (String) pt.requestBody(jmsURL, payload);
                try {
                        pt.stop();
                } catch (Exception e) {
                        System.out.println(" Can't stop the ProducerTemplate ");
                }

                return results;
        }



--
View this message in context: 
http://camel.465427.n5.nabble.com/ERROR-org-apache-camel-component-jms-DefaultJmsMessageListenerContainer-tp5792757p5799122.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to