3 Replies Latest reply on Feb 27, 2006 3:16 PM by timothy dennison

    How do I reset DurableSubscriptionsCount

    jdragon Newbie

      I have a Topic Queue and apparently, I forgot to close the connections during development. It seems like this count sticks around even after I stop/start JBoss...so I how do I reset DurableSubscriptionsCount back down to 0?

        • 1. Re: How do I reset DurableSubscriptionsCount
          Adrian Brock Master

          What has closing the connection or restarting the server got to do with it?

          If they are durable subscriptions, they survive. They are "DURABLE".

          You need to read the spec!

          connection = connectionFactory.createConnection();
          try
          {
           connection.setClientID(clientID);
           session = connection.createSession(false, AUTO_ACKNOWLEDGE);
           session.unsubscribe(subscriptionName);
          }
          finally
          {
           connection.close();
          }
          



          • 2. Re: How do I reset DurableSubscriptionsCount
            jdragon Newbie

            Thanks, so how do I manually remove these messages and the runaway references from past clients that haven't unsubscribed?

            "adrian@jboss.org" wrote:
            What has closing the connection or restarting the server got to do with it?

            If they are durable subscriptions, they survive. They are "DURABLE".

            You need to read the spec!

            connection = connectionFactory.createConnection();
            try
            {
             connection.setClientID(clientID);
             session = connection.createSession(false, AUTO_ACKNOWLEDGE);
             session.unsubscribe(subscriptionName);
            }
            finally
            {
             connection.close();
            }
            



            • 3. Re: How do I reset DurableSubscriptionsCount
              timothy dennison Newbie

              Is there an MBean that will allow me to unsubscribe durable subscribers from the jmx console? If I can list the subscribers, seems to make sense that I can remove them as well.