You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by gmotts <ga...@ventyx.com> on 2009/11/30 20:43:48 UTC

How do u unsubscribe a durable subscription?

Hi,

If a durable subscription is created using the serivcemix jms:consumer
component, similar to the code snippet below, what is the proper mechanism
to unsubcribe a durable subscription?  Please describe how to unsubscribe. 
Is custom code needed or is there a spring configuration or some other way?

    <jms:consumer service="myNamespace:TestSubscriberService"
        endpoint="TestSubscriberServiceEndpoint"
        targetService="myNamespace:myTargetService"
        clientId="client1"
        pubSubDomain="true"
        cacheLevel="3"
        destinationName="MyTopic"
        subscriptionDurable="true"
        durableSubscriptionName="TopicReader"
        messageSelector="destAppSvcName LIKE 'FOO''"
        connectionFactory="#connectionFactory"/> 
-- 
View this message in context: http://old.nabble.com/How-do-u-unsubscribe-a-durable-subscription--tp26580677p26580677.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: How do u unsubscribe a durable subscription?

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,

I don't think this is currently supported by the endpoint -- not sure
how to implement it either.  Usually, if you configure a durable
subscription, the goal is to make sure that the endpoint gets messages
that were enqueued while the endpoint was down.  If we would
unsubscribe the durable subscription on shutdown or anything, that
would defeat that purpose.

How/when would you like the unsubscribe to happen?  If there's a good
use case, we might be able to extend the endpoints to support that.
If this a very specific use case, you best option might be to create a
bean pojo that uses JMX to connect to the broker and delete the
subscription that way.  You can then hook up the bean with a quartz
timer or whatever trigger you would want to use for unsubscription.

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/11/30 gmotts <ga...@ventyx.com>:
>
> Hi,
>
> If a durable subscription is created using the serivcemix jms:consumer
> component, similar to the code snippet below, what is the proper mechanism
> to unsubcribe a durable subscription?  Please describe how to unsubscribe.
> Is custom code needed or is there a spring configuration or some other way?
>
>    <jms:consumer service="myNamespace:TestSubscriberService"
>        endpoint="TestSubscriberServiceEndpoint"
>        targetService="myNamespace:myTargetService"
>        clientId="client1"
>        pubSubDomain="true"
>        cacheLevel="3"
>        destinationName="MyTopic"
>        subscriptionDurable="true"
>        durableSubscriptionName="TopicReader"
>        messageSelector="destAppSvcName LIKE 'FOO''"
>        connectionFactory="#connectionFactory"/>
> --
> View this message in context: http://old.nabble.com/How-do-u-unsubscribe-a-durable-subscription--tp26580677p26580677.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>