[ 
https://issues.apache.org/jira/browse/QPIDJMS-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16256084#comment-16256084
 ] 

ASF subversion and git services commented on QPIDJMS-346:
---------------------------------------------------------

Commit 9258e899c22718875a25e37817f76c9994398646 in qpid-jms's branch 
refs/heads/master from [~tabish121]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-jms.git;h=9258e89 ]

QPIDJMS-346 Pass along any errors from result of unsubscribe calls

When the detach of a recovered durable subscription is received we need
to check that the remote did not indicate that there was an error on the
detach.  If there was then the unsubscribe likely failed and we want to
pass those errors along to the caller of Session#unsubscribe("sub")

> No Exception thrown when unsubscribing from a shared durable subscription 
> with active consumer
> ----------------------------------------------------------------------------------------------
>
>                 Key: QPIDJMS-346
>                 URL: https://issues.apache.org/jira/browse/QPIDJMS-346
>             Project: Qpid JMS
>          Issue Type: Bug
>          Components: qpid-jms-client
>    Affects Versions: 0.27.0
>            Reporter: Rob Godfrey
>
> Testing the shared durable subscription functionality against Qpid Broker-J I 
> found that if I attempted to unsubscribe a shared durable subscription from 
> client A, while still having an active consumer from client B, then no 
> exception was thrown in client A.
> The protocol trace from the client A is as follows:
> {noformat}
> [362461018:0] -> Attach{name='myDurableSub|global', handle=0, role=RECEIVER, 
> sndSettleMode=UNSETTLED, rcvSettleMode=FIRST, source=null, 
> target=Target{address='null', durable=NONE, expiryPolicy=SESSION_END, 
> timeout=0, dynamic=false, dynamicNodeProperties=null, capabilities=null}, 
> unsettled=null, incompleteUnsettled=false, initialDeliveryCount=null, 
> maxMessageSize=null, offeredCapabilities=null, desiredCapabilities=[shared, 
> global], properties=null}
> [362461018:0] <- Attach{name='myDurableSub|global', handle=0, role=SENDER, 
> sndSettleMode=UNSETTLED, rcvSettleMode=FIRST, source=Source{address='topic', 
> durable=CONFIGURATION, expiryPolicy=NEVER, timeout=0, dynamic=false, 
> dynamicNodeProperties=null, distributionMode=copy, filter=null, 
> defaultOutcome=Modified{deliveryFailed=true, undeliverableHere=null, 
> messageAnnotations=null}, outcomes=[amqp:accepted:list, amqp:released:list, 
> amqp:rejected:list], capabilities=[global, shared, topic]}, 
> target=Target{address='null', durable=NONE, expiryPolicy=SESSION_END, 
> timeout=0, dynamic=false, dynamicNodeProperties=null, capabilities=null}, 
> unsettled={}, incompleteUnsettled=false, initialDeliveryCount=0, 
> maxMessageSize=null, offeredCapabilities=[SHARED-SUBS], 
> desiredCapabilities=null, properties={}}
> [362461018:0] -> Detach{handle=0, closed=true, error=null}
> [362461018:0] <- Detach{handle=0, closed=true, 
> error=Error{condition=amqp:resource-locked, description='There are consumers 
> on Queue 'qpidsub_/_global__/myDurableSub_/durable'', info=null}}
> [362461018:0] -> Close{error=null}
> [362461018:0] <- Close{error=null}
> {noformat}
> While the broker is sending back a detach with closed=true (which is 
> essentially accurate) it is also providing an error.  The JMS API docs have 
> this to say:
> {quote}
> 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 in the 
> session.
> {quote}
> So I presume we should be triggering off the fact that the broker sent detach 
> contains an error to throw an appropriate JMSException



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to