activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Niski <>
Subject Re: Create durable topic subscriber ?
Date Mon, 18 Oct 2010 16:47:13 GMT
i did some exploratory testing around this issue when diagnosing problems i had with Durable

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%22>  |  Partnering to Help All Kids Learn

On 10/18/2010 12:58 AM, quoc_thai wrote:

Hi all,

   From the
   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.setMessageListener(new Listener());

   Can show me some code fragments to create durable topic ?

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message