Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-8091

ClientIdSet indefinitely contains obsolete ids (when connection is not closed properly)



    • Bug
    • Status: In Progress
    • Minor
    • Resolution: Unresolved
    • 5.16.0
    • None
    • Transport
    • ActiveMQ 5.16.0 standalone running on ec2-equivalent VMs with CentOS7.


      Hello Everyone,

      I'm trying to debug some strange issues with my cloud-deployed ActiveMQ Broker. I've run into an unfortunate side-bug. I figured I would present this particular problem with hopes that someone else might have the time to write the test and reproduce. If not, I'll come back later with the test to reproduce on a more functional deployment.

      My current brokers are manifesting some strange transport issues where my client is able to successfully connect, but thereafter does nothing (no authentication, no opening of sessions, etc). This, I imagine is a deeper networking issue that I intend to investigate further. If I find more info I may create a separate issue.

      At the same time, I noticed that re-running my test fails with javax.jms.InvalidClientIDException – The clientId is already taken. It remains this way indefinitely. The activemq admin console does not show any connections with this particular clientId.

      When reviewing the code I can see that clientIds are removed from the clientIdSet during the Broker.removeConnection() method.

      If the connection is not closed properly will there be a sort of connection garbage collection (the same that is done for unused destinations for example) that will ensure the these clientIds are removed from the set ? 

      Thanks in advance for your help.


        1. AMQClientTraces_obsoletClientId.txt
          17 kB
          Scott M Messner
        2. AMQBrorkerTraces_obsoletClientId.txt
          2 kB
          Scott M Messner



            mattrpav Matt Pavlovich
            blackstrype Scott M Messner
            0 Vote for this issue
            2 Start watching this issue