[
https://issues.apache.org/activemq/browse/CAMEL-3193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Christian Schneider updated CAMEL-3193:
---------------------------------------
Attachment: ClientTest.java
Adding a small sample client with pure spring jms (without camel) that shows an
attempt how we can fix the problem.
The idea is to use setExceptionListener for the MessageListenerComntainer. It
catches the InvalidDestinationException and then
recreates the temp queue and the Listener. I think we will need something
similar in camel.
listener.setExceptionListener(new ExceptionListener() {
@Override
public void onException(JMSException exception) {
exception.printStackTrace();
if (exception instanceof InvalidDestinationException) {
listener.stop();
setupListener(connectionFactory, jmsTemplate);
}
}
});
After looking into the code of camel jms I think the right place is in the
TemporaryQueueReplyManager. I will attach a patch shortly.
> After a longer connection loss to the jms server a jms endpoint does not work
> anymore even if the jms server comes back online
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-3193
> URL: https://issues.apache.org/activemq/browse/CAMEL-3193
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-jms
> Affects Versions: 2.5.0
> Reporter: Christian Schneider
> Assignee: Christian Schneider
> Fix For: 2.5.0
>
> Attachments: ClientTest.java, patch.txt
>
>
> To recreate the problem you need a route with a jms inout endpoint that is
> configured to use a temporary destination for replies. Till now I was only
> able to show the problem with tibco ems.
> - Start broker
> - Start the jms consumer that replies to the request
> - Start the route
> - Send a request/reoply exchange (should work)
> - Stop the broker
> - Wait long enough for the client to do a full reconnect (I used
> connectionFactory.setReconnAttemptCount(1) on the client so I do not have to
> wait so long)
> - Start the broker -> The jms component will do a full new connect
> - Send a request/reoply exchange -> Now a InvalidDestination Exception happens
> The client route will not work anymore until a restart as it creates the
> temporary destination only once and it is invalid now.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.