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 returned from a ConnectionFactory, but not on subsequent Connections. The ID is constructed 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 Learn 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 = consumer.getSession().createTopic("STOCKS." + stock); TopicSubscriber consumer = 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.
