4 Replies Latest reply on Sep 29, 2009 3:33 AM by Jeff Mesnil

    I think I found a bug (test script attached to confirm)

    Andrew Perepelytsya Newbie

      Hi folks,

      Please find below a simple test script to reproduce. The symptom is after killing all client connections Queue.removeMessages() throws an error, and the only way to fix it was to restart the broker.

      import javax.management.remote.JMXConnectorFactory
      import javax.management.remote.JMXServiceURL

      def serverUrl = 'service:jmx:rmi:///jndi/rmi://'
      println "Connecting to $serverUrl"

      def server = JMXConnectorFactory.connect(new JMXServiceURL(serverUrl)).MBeanServerConnection

      def hornetServer = new GroovyMBean(server, 'org.hornetq:type=Server,module=JMS')
      println 'All client connections killed'

      def q = new GroovyMBean(server, 'org.hornetq:type=Queue,module=JMS,name="out"')

      println 'Queue purged'


      Connecting to service:jmx:rmi:///jndi/rmi://
      All client connections killed
      Caught: java.lang.Exception: did not receive reply for message org.hornetq.core.client.impl.ClientMessageImpl@1ac3fc7

      Looks like reversing the order of operations (purge, then kill connections) is the viable workaround for now.