Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 67064 invoked from network); 18 Oct 2010 16:48:01 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Oct 2010 16:48:01 -0000 Received: (qmail 3998 invoked by uid 500); 18 Oct 2010 16:48:00 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 3967 invoked by uid 500); 18 Oct 2010 16:48:00 -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 3959 invoked by uid 99); 18 Oct 2010 16:47:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Oct 2010 16:47:59 +0000 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of joe.niski@nwea.org designates 65.55.88.11 as permitted sender) Received: from [65.55.88.11] (HELO TX2EHSOBE002.bigfish.com) (65.55.88.11) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Oct 2010 16:47:54 +0000 Received: from mail27-tx2-R.bigfish.com (10.9.14.249) by TX2EHSOBE002.bigfish.com (10.9.40.22) with Microsoft SMTP Server id 14.1.225.8; Mon, 18 Oct 2010 16:47:32 +0000 Received: from mail27-tx2 (localhost.localdomain [127.0.0.1]) by mail27-tx2-R.bigfish.com (Postfix) with ESMTP id 37C56148519 for ; Mon, 18 Oct 2010 16:47:32 +0000 (UTC) X-SpamScore: -20 X-BigFish: VS-20(zzbb2dKbb2cK98dN14ffOe66R9371Pzz1202hzz8275bh8275dh32f4s238anz31h27ah2a8h43h61h) X-Spam-TCS-SCL: 0:0 Received: from mail27-tx2 (localhost.localdomain [127.0.0.1]) by mail27-tx2 (MessageSwitch) id 1287420451734626_22005; Mon, 18 Oct 2010 16:47:31 +0000 (UTC) Received: from TX2EHSMHS023.bigfish.com (unknown [10.9.14.253]) by mail27-tx2.bigfish.com (Postfix) with ESMTP id A71F7A78056 for ; Mon, 18 Oct 2010 16:47:31 +0000 (UTC) Received: from lko-exh01.Americas.nwea.pvt (70.98.171.6) by TX2EHSMHS023.bigfish.com (10.9.99.123) with Microsoft SMTP Server (TLS) id 14.0.482.44; Mon, 18 Oct 2010 16:47:30 +0000 Received: from LKO-EXCH01.Americas.nwea.pvt ([10.1.1.120]) by lko-exh01.Americas.nwea.pvt ([10.1.0.124]) with mapi; Mon, 18 Oct 2010 09:47:15 -0700 From: Joe Niski To: "users@activemq.apache.org" Date: Mon, 18 Oct 2010 09:47:13 -0700 Subject: Re: Create durable topic subscriber ? Thread-Topic: Create durable topic subscriber ? Thread-Index: Actu5B4LS6asefnjTruQkP/tuPBXFw== Message-ID: <4CBC7A11.205@nwea.org> References: <1287388732652-2999808.post@n4.nabble.com> In-Reply-To: <1287388732652-2999808.post@n4.nabble.com> Reply-To: Joe Niski Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9pre) Gecko/20100217 Lightning/1.0b1 Shredder/3.0.3pre acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_4CBC7A11205nweaorg_" MIME-Version: 1.0 X-Bypass-Agent: EF-1; X-Reverse-DNS: unknown --_000_4CBC7A11205nweaorg_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable i did some exploratory testing around this issue when diagnosing problems i= had with Durable Subscriptions. ActiveMQ (5.3.0) appears to set aClient ID for the first Connection returne= d from a ConnectionFactory, but not on subsequent Connections. The ID is co= nstructed from the broker ID, i believe. But you can call Connection.setClientID(String) to set it yourself, before = calling Connection.CreateDurableConnectionConsumer(). Joe Niski IS Development | NWEA PHONE 503.212.3382 | FAX 503.639.7873 NWEA.ORG<3D%22http://www.nwea.org/%22> | Partnering to Help All Kids Lear= n On 10/18/2010 12:58 AM, quoc_thai wrote: Hi all, From the http://activemq.apache.org/how-do-durable-queues-and-topics-work.html http://activemq.apache.org/how-do-durable-queues-and-topics-work.html I want create a durable topic subscriber but at the consumer, I receive some error "You cannot create a durable subscriber without specifying a unique clientID on a Connection" At the consumer, my code fragment: ------------------------ Topic topic =3D consumer.getSession().createTopic("STOCKS." + stock); TopicSubscriber consumer =3D consumer.getSession().createDurableSubscriber(topic,"myDurable1"); consumer.setMessageListener(new Listener()); ------------------------ Can show me some code fragments to create durable topic ? Thanks. -- View this message in context: http://activemq.2283324.n4.nabble.com/Create-= durable-topic-subscriber-tp2999808p2999808.html Sent from the ActiveMQ - User mailing list archive at Nabble.com. --_000_4CBC7A11205nweaorg_--