Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BFA5344AD for ; Fri, 27 May 2011 13:47:32 +0000 (UTC) Received: (qmail 48101 invoked by uid 500); 27 May 2011 13:47:32 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 48071 invoked by uid 500); 27 May 2011 13:47:32 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 48063 invoked by uid 99); 27 May 2011 13:47:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 May 2011 13:47:32 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gcjau-user-2@m.gmane.org designates 80.91.229.12 as permitted sender) Received: from [80.91.229.12] (HELO lo.gmane.org) (80.91.229.12) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 May 2011 13:47:25 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QPxNV-0002sj-J9 for users@activemq.apache.org; Fri, 27 May 2011 15:47:01 +0200 Received: from bsb3.2e-systems.com ([80.153.213.85]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 May 2011 15:47:01 +0200 Received: from aleksandar by bsb3.2e-systems.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 May 2011 15:47:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: users@activemq.apache.org From: Aleksandar Ivanisevic Subject: Re: STOMP and durable topic subscriptions Date: Fri, 27 May 2011 15:46:49 +0200 Organization: Individual Lines: 85 Sender: alex@alex.2e-systems.com Message-ID: References: <1306500975.2761.1.camel@office> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: bsb3.2e-systems.com Original-Sender: aleksandar@ivanisevic.de X-Face: "4JwcMHVV7.+Q"O&7#~e!/D3&-We*\6>YCmt~!;eHB\Qc$GGC}v}V[BFN]+pX;wqky_vXgj Ag!*"Am:~ffPJV&#cV*0"NeN9I]gaK$eDg`>`!5Ep&J_:/#KPnG3g.u|DV]i7P@l#46^UkNF\#"N%Q s9VP9Clc>qmNO$c(.^"2~nkJ.0LC+F{"sZI@+Ut User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:d0Fx+PDiK3JtN89nAZy+3NIJaIw= Timothy Bish 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