title: 1000s of Management Queues in Artemis Web Console
body: <p>I'm using the management API for ActiveMQ Artemis 2.17.0 to get the count on 1 queue using the following code;</p>
  <pre><code>    val message = session!!.createMessage(false)
      ManagementHelper.putAttribute(message, &quot;queue.$queueName&quot;, &quot;messageCount&quot;)
      val requestor = ClientRequestor(session, &quot;activemq.management&quot;)
      val reply = requestor.request(message)
      val count = (ManagementHelper.getResult(reply) as Long).toInt()
  </code></pre>
  <p>However, this code runs every 30 seconds so after about an hour it results in 1000s of new temporary queues being created which in turn, pollutes and slows the Management Console. Is there anyway to remove these queues (or better yet not have them created when retrieving the message count)? (Note: The queues are removed once the service is restarted)</p>
  <p><a href="https://i.stack.imgur.com/gUi4t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gUi4t.png" alt="enter image description here" /></a></p>