activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksandar Ivanisevic <aleksan...@ivanisevic.de>
Subject Re: STOMP and durable topic subscriptions
Date Fri, 27 May 2011 13:46:49 GMT
Timothy Bish <tabish121@gmail.com>
writes:

> 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."

I am always supplying the same client-id, it is actually the same
STOMP session. What I don't understand is how come to create the
subscription I have to put the durable name in
activemq.subscriptionName header, but when unsubscribing if I put it
in the same header i get an exception in amq log, and if I put it in
the id header (which I found by looking at the sources) it seems
successful (i.e. no error) but still doesn't work.

Can you (or someone, anyone) please provide an example of subscribing
and unsubscribing to a durable topic?

>> 
>> [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
>
>

-- 
Ti si arogantan, prepotentan i peglaš vlastitu frustraciju. -- Ivan
Tišljar, hr.comp.os.linux


Mime
View raw message