Also based on [1] it specifies the following on un-subscription under the
section "Unsubscribe" of shared/ non shared durable subscriptions.

"It is erroneous for a client to delete a durable subscription *while there
is an active (not closed) consumer for the subscription*, or while a
consumed message is part of a pending transaction or has not been
acknowledged"

its a bit ambiguous, but based on my interpretation, un subscription should
not be allowed if there're active subscribers for a given topic.

[1] https://wiki.oasis-open.org/amqp-bindmap/JMSMapping/SubscriptionsV2

On Mon, Aug 31, 2015 at 11:21 AM, Hasitha Hiranya <[email protected]> wrote:

> By AMQP semantics "unsubscribe" call breaks into two subsequent calls.
>
> 1. subscription close
> 2. queue delete
>
> If only one subscriber is there these calls does not matter. When there
> are multiple (shared durable), with the existing impl I guess
> we will delete the queue. Meaning rest of the subscribers will not get
> messages.
>
>
>
> On Mon, Aug 31, 2015 at 11:16 AM, Asanka Abeyweera <[email protected]>
> wrote:
>
>> I think we should follow what we do with the queue subscriptions. For
>> queues we don't remove all the subscriptions when a single subscriber sends
>> an unsubscribe request.
>>
>> Therefore +1 for option 2.
>> .
>>
>> On Mon, Aug 31, 2015 at 11:02 AM, Pamod Sylvester <[email protected]> wrote:
>>
>>> Hi All,
>>>
>>> When enabled shared subscriptions, it creates subscription groups which
>>> are distinguished through the client ids of the consumers. hence, for a
>>> given durable topic it allows multiple subscriptions to be bound with the
>>> same client id, in return when a message is delivered, for the consumers
>>> bound with the same client id, the messages will be load balanced.
>>>
>>> The question is,
>>>
>>> in the event where one of the subscriptions with a given client id sends
>>> an unsubscribe request,
>>>
>>> 1) should we remove all the other subscriptions bound to the topic with
>>> the same client id or
>>> 2) should we remove only that particular subscription ?
>>>
>>> To elaborate more, the following is an example,
>>>
>>> i.e let's say there're 10 subscriptions with the same client id bound to
>>> a topic as shared durable subscriptions, if the 10th subscriber sends a
>>> un-subscription request should we remove all other 9 subscriptions
>>> belonging to the group or should we remove only that particular
>>> subscription and eventually remove the underlaying queue which persists
>>> offline messages when we identify when the request is sent by the last
>>> subscription belonging to the shared subscription group (client id).
>>>
>>> What should be the best way to handle this ?
>>>
>>> Thanks,
>>> Pamod
>>> --
>>> *Pamod Sylvester *
>>>
>>> *WSO2 Inc.; http://wso2.com <http://wso2.com>*
>>> cell: +94 77 7779495
>>>
>>
>>
>>
>> --
>> Asanka Abeyweera
>> Software Engineer
>> WSO2 Inc.
>>
>> Phone: +94 712228648
>> Blog: a5anka.github.io
>>
>
>
>
> --
> *Hasitha Abeykoon*
> Senior Software Engineer; WSO2, Inc.; http://wso2.com
> *cell:* *+94 719363063*
> *blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com>
>
>


-- 
*Pamod Sylvester *

*WSO2 Inc.; http://wso2.com <http://wso2.com>*
cell: +94 77 7779495
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to