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 36F074376 for ; Fri, 27 May 2011 14:04:38 +0000 (UTC) Received: (qmail 78014 invoked by uid 500); 27 May 2011 14:04:37 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 77983 invoked by uid 500); 27 May 2011 14:04:37 -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 77975 invoked by uid 99); 27 May 2011 14:04:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 May 2011 14:04:37 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chubrilo@gmail.com designates 209.85.161.43 as permitted sender) Received: from [209.85.161.43] (HELO mail-fx0-f43.google.com) (209.85.161.43) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 May 2011 14:04:32 +0000 Received: by fxm3 with SMTP id 3so1910487fxm.2 for ; Fri, 27 May 2011 07:04:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=KLM6z7GGeshaKaT7zWxRDyBswfA0KhqGbKbXZY8cUUs=; b=TBdgSVLCBaXo0eJnsBX1nF5Cpxsj9arWlaYDs05V4WHC1m+1qd6o5IrbCFsl4cKMEU Z1I/RpCPSc5MXj1F463QqL+Eeo4E74jSvzrXrFLZSK//HBX7nq38Xgv3ojpL38XSsDcT PXa2SPDM74ngL9HCvUf1ueDCyq6mdXyWaSMaM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=Flaxgpl4TYdTcfPvn9XBl9aWDv/9Mf5OC0UE7qqA/6xQavx1AdopBR7biu1r0uswzr POiyi6KcCg40HyAXTLalEo95knjkMRDu8L+NwiqbJEyCkdPdIGETCHILAXWOXeDJgr6y eNeFfUkARaXGEyggNcc3Mt50gRYiFVBvNDvIw= MIME-Version: 1.0 Received: by 10.223.103.3 with SMTP id i3mr2355473fao.110.1306505051697; Fri, 27 May 2011 07:04:11 -0700 (PDT) Sender: chubrilo@gmail.com Received: by 10.223.96.200 with HTTP; Fri, 27 May 2011 07:04:11 -0700 (PDT) In-Reply-To: References: <1306500975.2761.1.camel@office> Date: Fri, 27 May 2011 16:04:11 +0200 X-Google-Sender-Auth: 4nPotc8kdLuc2EuAklnbDG2rG2A Message-ID: Subject: Re: STOMP and durable topic subscriptions From: Dejan Bosanac To: users@activemq.apache.org Content-Type: multipart/alternative; boundary=20cf3054a55580f25004a4426966 X-Virus-Checked: Checked by ClamAV on apache.org --20cf3054a55580f25004a4426966 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Take a look at StompTest.testDurableUnsub() https://fisheye6.atlassian.com/browse/activemq/trunk/activemq-core/src/test= /java/org/apache/activemq/transport/stomp/StompTest.java?hb=3Dtrue It contains some example that should work. If it's not working, can you please provide a similar test case Regards --=20 Dejan Bosanac - http://twitter.com/dejanb ----------------- The experts in open source integration and messaging - http://fusesource.co= m ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net Connect at CamelOne May 24-26 The Open Source Integration Conference On Fri, May 27, 2011 at 3:46 PM, Aleksandar Ivanisevic < aleksandar@ivanisevic.de> wrote: > 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= =3D5 > durable name=3Dmasterbcast > >> > >> ... > >> > >> [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=3Dmasterbcast > >> 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(TopicReg= ion.java:135) > >> at > org.apache.activemq.broker.region.RegionBroker.removeSubscription(RegionB= roker.java:491) > >> at > org.apache.activemq.broker.BrokerFilter.removeSubscription(BrokerFilter.j= ava:102) > >> at > org.apache.activemq.broker.BrokerFilter.removeSubscription(BrokerFilter.j= ava: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=B9 vlastitu frustraciju. -- Ivan > Ti=B9ljar, hr.comp.os.linux > > --20cf3054a55580f25004a4426966--