Hi If you use ActiveMQ you may need to turn off asyncSend http://activemq.apache.org/async-sends.html
On Mon, Feb 9, 2015 at 4:20 PM, James Green <james.mk.gr...@gmail.com> wrote: > We have a route from a REST endpoint into a JMS (InOnly) endpoint. > > We took down the broker to see what would happen. Turns out HTTP clients > hang waiting for a response (for several minutes) while a load of stack > traces are logged by Camel: > > 09/Feb/2015 15:07:52,677- DefaultErrorHandler: Failed delivery for > (MessageId: ID-ngw-smtp-01-56823-1423494454408-0-1 on ExchangeId: > ID-ngw-smtp-01-56823-1423494454408-0-5). On delivery attempt: 0 caught: > org.springframework.jms.UncategorizedJmsException: Uncategorized exception > occured during JMS processing; nested exception is javax.jms.JMSException: > Cannot send, channel has already failed: tcp://10.0.0.97:61616 > 09/Feb/2015 15:07:52,677- DefaultErrorHandler: Failed delivery for > (MessageId: ID-ngw-smtp-01-56823-1423494454408-0-1 on ExchangeId: > ID-ngw-smtp-01-56823-1423494454408-0-4). On delivery attempt: 0 caught: > org.springframework.jms.UncategorizedJmsException: Uncategorized exception > occured during JMS processing; nested exception is javax.jms.JMSException: > Cannot send, channel has already failed: tcp://10.0.0.97:61616 > 09/Feb/2015 15:07:52,684- DefaultErrorHandler: Failed delivery for > (MessageId: ID-ngw-smtp-01-56823-1423494454408-0-1 on ExchangeId: > ID-ngw-smtp-01-56823-1423494454408-0-4). Exhausted after delivery attempt: > 1 caught: org.springframework.jms.UncategorizedJmsException: Uncategorized > exception occured during JMS processing; nested exception is > javax.jms.JMSException: Cannot send, channel has already failed: tcp:// > 10.0.0.97:61616 > > 09/Feb/2015 15:07:52,689- TransactionErrorHandler: Transaction rollback > (0x5d16d955) redelivered(unknown) for (MessageId: > ID-ngw-smtp-01-56823-14234944 > 54408-0-1 on ExchangeId: ID-ngw-smtp-01-56823-1423494454408-0-5) caught: > org.springframework.jms.UncategorizedJmsException: Uncategorized exception > occ > ured during JMS processing; nested exception is javax.jms.JMSException: > Cannot send, channel has already failed: tcp://10.0.0.97:61616 > 09/Feb/2015 15:07:52,689- MulticastProcessor: Message exchange has failed: > Sequential processing failed for number 0 for exchange: Exchange[Message: [B > ody is instance of org.apache.camel.StreamCache]] Exception: > org.apache.camel.RuntimeCamelException: > org.springframework.jms.UncategorizedJmsException: > Uncategorized exception occured during JMS processing; nested exception is > javax.jms.JMSException: Cannot send, channel has already failed: tcp://10.0 > .0.97:61616 > 09/Feb/2015 15:07:52,689- MulticastProcessor: Done sequential processing 1 > exchanges > 09/Feb/2015 15:07:52,689- Pipeline: Message exchange has failed: so > breaking out of pipeline for exchange: Exchange[Message: [Body is instance > of org.a > pache.camel.StreamCache]] Exception: > org.apache.camel.RuntimeCamelException: > org.springframework.jms.UncategorizedJmsException: Uncategorized exception > occured during JMS processing; nested exception is javax.jms.JMSException: > Cannot send, channel has already failed: tcp://10.0.0.97:61616 > 09/Feb/2015 15:07:52,689- Pipeline: Message exchange has failed: so > breaking out of pipeline for exchange: Exchange[Message: [Body is instance > of org.a > pache.camel.StreamCache]] Exception: > org.apache.camel.RuntimeCamelException: > org.springframework.jms.UncategorizedJmsException: Uncategorized exception > occured during JMS processing; nested exception is javax.jms.JMSException: > Cannot send, channel has already failed: tcp://10.0.0.97:61616 > 09/Feb/2015 15:07:52,690- TransactionErrorHandler: Transaction rollback > (0x5d16d955) redelivered(unknown) for (MessageId: > ID-ngw-smtp-01-56823-1423494454408-0-1 on ExchangeId: > ID-ngw-smtp-01-56823-1423494454408-0-2) caught: > org.springframework.jms.UncategorizedJmsException: Uncategorized exception > occured during JMS processing; nested exception is javax.jms.JMSException: > Cannot send, channel has already failed: tcp://10.0.0.97:61616 > > We have plugged on some onException clauses but none appear to execute: > > onException(javax.jms.JMSException.class, Exception.class, > RuntimeException.class) > .log(LoggingLevel.ERROR, logger, "Exception!") > .handled(true) > .setHeader(Exchange.HTTP_RESPONSE_CODE, constant(500)) > .setBody().constant("Something bad happened"); > > Can someone advice on what I'm missing? What we want is to respond with a > 500 HTTP code but catching JMSException appears not be working. > > Thanks, > > James -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/