I had an error in a property file with an incorrect queue name that didn't 
exist. When the JMS Reply was hit a JMSException was generated "MQJMS2008: 
failed to open MQ queue". This is to be expected. What happens is that Camel 
goes into an infinite loop trying to process the message.

I was expecting my onException in the Route would handle it but it did not. I 
have tried to add an ExceptionListener that "is to be notified of any 
underlying JMS exceptions"  however I think I have the syntax wrong. Here is a 
simplified version of my route:

public void configure() throws Exception {
                getContext().setHandleFault(true);
                
onException(JmsException.class).handled(true).to("jms:SYSTEM.DEAD.LETTER.QUEUE");
                errorHandler(deadLetterChannel("jms:SYSTEM.DEAD.LETTER.QUEUE"));

                
from("jms:CBS.START?replyTo=CBS.REPLY&exceptionListener=com.aon.camel.exception.ExceptionListener")
                .process(new JmsInboundMessageProcessor())
                
.recipientList(simple("${header.requestNode}")).ignoreInvalidEndpoints()
                .process(new JmsOutboundMessageProcessor());
}

Thanks,

Damian.

________________________________

This communication (and any attachments) is directed in confidence to the 
addressee(s) listed above, and may not otherwise be distributed, copied or 
used. The contents of this communication may also be subject to privilege, and 
all rights to that privilege are expressly claimed and not waived. If you have 
received this communication in error, please notify us by reply e-mail or by 
telephone and delete this communication (and any attachments) without making a 
copy.

Before opening or using attachments, you should check them for viruses and 
defects. We do not accept liability in connection with computer virus, data 
corruption, delay, interruption, unauthorised access or unauthorised amendment.

Reply via email to