On Thu, Mar 5, 2009 at 12:33 PM, akuhtz <andreas.ku...@siemens.com> wrote:
>
> There is currently no code to unsubscribe a durable subscriber as Camel uses
> the XXMessageListenerContainer classes from the spring framework and inside
> the spring code there is no unsubscribe code. I solved this yesterday by
> making a copy of the (in my case) SimpleMessageListenerContainer and added
> the unsubscribe code to the doShutdown() method (I couldn't just extend from
> SimpleMessageListenerContainer and overwrite doShutdown() because the
> consumers are private and no protected access method exists, and between
> close the consumers and close the session there is (unfortunately) no
> callback where the unsubcribe could be executed.
>
> If you find another solution without copying the class please let me know
> :-)
You could consider creating a ticket at Spring about this issue to
allow easier subclassing of the SimpleMessageListenerContainer, or
callbacks so we can do the unsubscribe there. Would be good to get in
Spring 3.0.


>
>
> Claus Ibsen-2 wrote:
>>
>> On Thu, Mar 5, 2009 at 3:38 AM, ariekenb <aaron.j.riekenb...@lmco.com>
>> wrote:
>>>
>>> If I create a durable topic subscription using the jms or activemq
>>> components
>>> (for example
>>> activemq:topic:myTopic?clientId=client1&durableSubscriptionName=subscription1),
>>> does camel ever cause the durable subscription to be destroyed?  In other
>>> words will camel ever cause session.unsubscribe to be called?  I'm
>>> working
>>> in a situation where I'm implementing failover of a durable subscription
>>> on
>>> different machines using camel and I want to be sure the durable
>>> subscription does not get destroyed when the camel context is destroyed.
>>> Just out of curiosity, I'm also wondering how/if one can indicate he
>>> wants
>>> the durable subscription to be destroyed when the camel context is
>>> destroyed.
>> Not to my knowledge. But I would advice you to double check the source
>> code of camel-jms
>> to see if there is any code that would call unsubscribe. Usually such
>> code would be in doStop or stop methods.
>>
>> James Strachan who wrote the camel-jms component would be in a better
>> position to clarify this.
>>
>> With your findings we should update the wiki, so please report back.
>>
>>
>>>
>>> As an aside there is a small bug on this web page describing durable
>>> subscriptions (http://camel.apache.org/jms.html).  The first paragraph
>>> under
>>> "Notes" states "If you wish to use durable topic subscriptions, you need
>>> to
>>> specify both clientId and durableSubscriberName."  durableSubscriberName
>>> does not work.  The table below has the correct property:
>>> durableSubscriptionName.
>> Thanks for spotting this. Fixed the typo.
>>
>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Are-durable-topic-subscriptions-destroyed--tp22344211p22344211.html
>>> Sent from the Camel - Users (activemq) mailing list archive at
>>> Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Are-durable-topic-subscriptions-destroyed--tp22344211p22349650.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Reply via email to