ActiveMQ version 5.8. Seeing a strange behavior where a consumer is connected to the broker but throwing "InvalidClientIDException". which says that one more connection is trying to connect to the the broker using the same client_id. But I am only creating one connection: Single consumer, subscribing to a single topic.[I am only seeing this issue with every consumer. Only sometimes this issue is happening]
/org.apache.activemq.broker.TransportConnection#processAddConnection 772 WARN] - Failed to add Connection ID:barium21.nyc.*.com-42338-1399765615445-1:1, reason: javax.jms.InvalidClientIDException: Broker: mqbrokerqa - Client: JMSPonger already connected from tcp://barium21.nyc.*.com:45656 / When I checked the source code of ActiveMQ RegionBroker I suspect while remove client there are some checks which might causing this issue and not let the clientID remove from the clientIDList. Below is the source code from RegionBroker: I don;t understand why do we need to check the context and connection Id's. If we are sure that there can only be one client possible with one client ID. then why can't we directly remove that without checking conenction ID and context ? ... public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception) { ..... synchronized (clientIdSet) { ConnectionContext oldValue = clientIdSet.get(clientId); // we may be removing the duplicate connection, not the first // connection to be created // so lets check that their connection IDs are the same if (oldValue == context) { if (isEqual(oldValue.getConnectionId(), info.getConnectionId())) { clientIdSet.remove(clientId); ..... } ... Thanks, Anuj -- View this message in context: http://activemq.2283324.n4.nabble.com/client-ID-is-not-removed-from-clientIdSet-while-removing-the-connection-tp4681139.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.