activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co <>
Subject (broker.getClients()[0])getConnectionId() actually returns clientId -- is this a bug?
Date Wed, 01 Oct 2008 00:02:39 GMT

I am using ActiveMq version 4.1.1 and created a class that extends
BrokerFilter.  In it, I am able to view connection info, say public void
addConnection(ConnectionContext context, ConnectionInfo info).  In this
method, whenever a new client connects, info.clientId shows an ID and
connectionId shows an a similar, but different ID.  I get an connected
clients from within this class by doing this.getClients().  This will return
a list of Connection, in which I can get the connectionId:
(this.getClients()[0]).getConnectionId().  I was expecting taht this woudl
return the same connectionId as info.connectionId; however, I was surprise
to find that this return the id of info.clientId.  

First, is this a bug or a mis-naming of that attribute?  Keep in mind that I
am still a learner.

Second, what is the proper way of retrieving the client list and then get
the connectionId (info.connectionId) of that clients?  I am thinking that I
need to keep this list myself.

On the side, I notice that even for publisher, the addConsumer method gets
called.  AddProcedure first gets called, then addConsumer.  For subscriber,
addConsumer gets called twice.  The first call is for addConnection and the
second call is for addSession.  Is this normal?

Let me know if I should have posted this to the user forum instead.  Thanks.
View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at

View raw message