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: http://www.nabble.com/%28broker.getClients%28%29-0-%29getConnectionId%28%29-actually-returns-clientId----is-this-a-bug--tp19752532p19752532.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
