You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Michael Justin <mi...@gmx.net> on 2016/03/13 08:26:59 UTC
ActiveMQ 5.13.0 warning on unsubscribing durable subscriber
The client connects and specified a client id:
CONNECT
client-id:test2
and subscribes with a subscription name
SUBSCRIBE
destination:/topic/TestUnsubscribeDurable
ack:auto
id:...
activemq.subscriptionName:testsub
But when the client sends the two unsubscribe frames as explained in
http://stackoverflow.com/questions/30519152/how-to-unsubscribe-from-durable-topic-subscription,
UNSUBSCRIBE
destination:/topic/TestUnsubscribeDurable
UNSUBSCRIBE
destination:/topic/TestUnsubscribeDurable
activemq.subscriptionName:testsub
the ActiveMQ broker logs a warning:
WARN | Exception occurred processing: null:
javax.jms.InvalidDestinationException: No durable subscription exists
for clientID: testsub and subscriptionName: testsub
The warning is a bit confusing because the clientID used when connecting
was test2, not testsub.
Unsubscribing only seems to work when client-id equals subscriptionName
(the admin interface then no longer shows the subscription).
ActiveMQ 5.7 removed the restriction that client-id and subscriptionName
have to be the same. Can it be that this change was not applied to the
unsubscribe logic?
Also posted on Stackoverflow at http://stackoverflow.com/questions/35936950/
Re: ActiveMQ 5.13.0 warning on unsubscribing durable subscriber
Posted by Timothy Bish <ta...@gmail.com>.
The feature of not matching the client ID and the subscription name only
works for the newer STOMP v1.1+ style subscriptions where the 'id' value
is included. In your example you would need to match the client ID to
the subscription name.
Refer to this test using v1.1:
https://github.com/apache/activemq/blob/master/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/Stomp11Test.java#L933
On 03/13/2016 03:26 AM, Michael Justin wrote:
>
> The client connects and specified a client id:
>
> CONNECT
> client-id:test2
>
> and subscribes with a subscription name
>
> SUBSCRIBE
> destination:/topic/TestUnsubscribeDurable
> ack:auto
> id:...
> activemq.subscriptionName:testsub
>
>
>
> But when the client sends the two unsubscribe frames as explained in
> http://stackoverflow.com/questions/30519152/how-to-unsubscribe-from-durable-topic-subscription,
>
>
> UNSUBSCRIBE
> destination:/topic/TestUnsubscribeDurable
>
> UNSUBSCRIBE
> destination:/topic/TestUnsubscribeDurable
> activemq.subscriptionName:testsub
>
> the ActiveMQ broker logs a warning:
>
> WARN | Exception occurred processing: null:
> javax.jms.InvalidDestinationException: No durable subscription
> exists
> for clientID: testsub and subscriptionName: testsub
>
> The warning is a bit confusing because the clientID used when
> connecting was test2, not testsub.
>
> Unsubscribing only seems to work when client-id equals
> subscriptionName (the admin interface then no longer shows the
> subscription).
>
> ActiveMQ 5.7 removed the restriction that client-id and
> subscriptionName have to be the same. Can it be that this change was
> not applied to the unsubscribe logic?
>
>
> Also posted on Stackoverflow at
> http://stackoverflow.com/questions/35936950/
>
>
--
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/