camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] [Commented] (CAMEL-7024) Invoking removeEndpoints() api against a JmsEndpoint does not remove associated Jms listener
Date Fri, 29 Nov 2013 09:41:36 GMT


Claus Ibsen commented on CAMEL-7024:

The route is using that endpoint, and the route is still running, so you would need to stop
the route also


> Invoking removeEndpoints() api against a JmsEndpoint does not remove associated Jms listener
> --------------------------------------------------------------------------------------------
>                 Key: CAMEL-7024
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jms
>    Affects Versions: 2.10.3
>            Reporter: Joe Luo
>            Assignee: Claus Ibsen
>             Fix For: 2.13.0
> 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:
> {code}
> jms-test:queue:test.request?replyTo=test.response&replyToType=Exclusive&requestTimeout=20000&concurrentConsumers=1
> {code}
> 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:
> {code}
> Collection<Endpoint> removeEndpoints(String pattern) throws Exception;
> {code}
> For instance:
> {code}
> camelContext.removeEndpoints("jms-test*");
> {code}
> 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