camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Luo (JIRA)" <>
Subject [jira] [Created] (CAMEL-7024) Invoking removeEndpoints() api against a JmsEndpoint does not remove associated Jms listener
Date Thu, 28 Nov 2013 19:36:35 GMT
Joe Luo created CAMEL-7024:

             Summary: Invoking removeEndpoints() api against a JmsEndpoint does not remove
associated Jms listener
                 Key: CAMEL-7024
             Project: Camel
          Issue Type: Bug
          Components: camel-jms
    Affects Versions: 2.10.3
            Reporter: Joe Luo

I have a camel route that receives Camel Exchanges through JMS and based on its content it
builds on the fly the endpoint URI as a string. The URI comprises a request queue and a response
queue, and looks something similar to:

This URI is then used on a *ReceipientList* which sends the JMS message.
Camel caches the above URI as one of its available endpoints, and registers a listener (a
DefaultMessageListenerContainer) against the response queue.

Client determines some of the parameters, for instance the timeout to be used. If a new exchange
for instance uses a different timeout, Camel would cache a second endpoint with similar URI
except for the timeout, and would create a second JMS listener (DMLC) on the same response

The above would create a conflict between the first listener and the second as they would
both compete for JMS response messages. For this reason I need to remove the first endpoint
using following Camel API:
Collection<Endpoint> removeEndpoints(String pattern) throws Exception;
For instance:
which successfully deletes it, but does not unsubscribe the JMS listener.

The reason is that when Camel removes the endpoint, it does not invoke stop() on associated
JmsProducer object which in turn calls unInitReplyManager() to stop and destroy the DMLC that
is created by ReplyManager for the response queue.

This message was sent by Atlassian JIRA

View raw message