activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: STOMP and durable topic subscriptions
Date Fri, 27 May 2011 12:56:15 GMT
On Fri, 2011-05-27 at 13:04 +0200, Aleksandar Ivanisevic wrote:
> 
> Hi,
> 
> what is the status on durable topic subscriptions under STOMP? Should
> STOMP unsubscribe remove the durable subscription or not?
> 
> according to 
> 
> http://mail-archives.apache.org/mod_mbox/activemq-users/200808.mbox/%3C19181282.post@talk.nabble.com%3E
> 
> and
> 
> https://issues.apache.org/jira/browse/AMQ-1890
> 
> it should, but in my setup it doesnt, im using 5.4.2-fuse-03-15 and
> below is my session, after the last unsubscribe i can still see the
> subscription under offline durable subscriptions in the console.
> 
> There is even more annoying bug where in some cases (not always),
> reconnecting creates a "double" subscription so for every message to
> the topic consumer gets two identical messages. The only solution to
> that is to either bounce the broker or shutdown the consumer, go to
> the console and delete durable subscriptions and start the consumer
> again.
> 

Refer to the ActiveMQ documentation on Stomp here:
http://activemq.apache.org/stomp.html

Note the discussion at the bottom of the page for the subscription name
property,

"For durable topic subscriptions you must specify the same clientId on
the connection and subcriptionName on the subscribe."

Regards


> 
> [27664] T+0 DEBUG (re)connecting...
> send [CONNECT
> client-id:adminbroker-test
> passcode:xxx
> login:xxx
> 
> ]
> receive [CONNECTED
> session:adminbroker-test
> 
> ]
> send [SUBSCRIBE
> activemq.prefetchSize:5
> activemq.subscriptionName:masterbcast
> ack:client-individual
> destination:/topic/COMMAND.broadcast
> 
> ]
> [27664] T+0 DEBUG subscribed to /topic/COMMAND.broadcast prefetchSize=5 durable name=masterbcast
> 
> ...
> 
> [27664] T+15 DEBUG got exit command, shutting down cleanly...
> send [UNSUBSCRIBE
> activemq.subscriptionName:masterbcast
> destination:/topic/COMMAND.broadcast
> 
> ]
> [27664] T+15 DEBUG unsubscribed from /topic/COMMAND.broadcast durable name=masterbcast
> send [DISCONNECT
> 
> ]
> 
> in activemq.log I see
> 
> 2011-05-27 13:01:07,042 | WARN  | Async error occurred: javax.jms.InvalidDestinationException:
No durable subscription exists for: masterbcast | org.apache.activemq.broker.TransportConnection.Service
| ActiveMQ Transport: ssl:///192.168.222.78:40678
> javax.jms.InvalidDestinationException: No durable subscription exists for: masterbcast
>         at org.apache.activemq.broker.region.TopicRegion.removeSubscription(TopicRegion.java:135)
>         at org.apache.activemq.broker.region.RegionBroker.removeSubscription(RegionBroker.java:491)
>         at org.apache.activemq.broker.BrokerFilter.removeSubscription(BrokerFilter.java:102)
>         at org.apache.activemq.broker.BrokerFilter.removeSubscription(BrokerFilter.java:102)
> 

-- 
Tim Bish
------------
FuseSource
Email: tim.bish@fusesource.com
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/

Connect at CamelOne May 24-26

The Open Source Integration Conference


Mime
View raw message