4 Replies Latest reply on Feb 9, 2015 2:39 PM by ctomc

    Jboss 7.1.1 CLI Problem read message count in Queue

    stonesoft


      When i run jboss-cli.sh with the following command it gives me a different count than I see in the admin console.

       

      ./jboss-cli.sh --user=abc --password=def --controller=1.2.3.4:9990 -c --commands="connect,/subsystem=messaging/hornetq-server=default/jms-queue=MyQueue/:read-attribute(name=message-count),exit"

       

      This command returns 2000L while the admin console has 0L.

       

       

      any ideas?

       

      thanks

      -kevin

        • 1. Re: Jboss 7.1.1 CLI Problem read message count in Queue
          jbertram

          Do you see the same behavior on the latest release of Wildfly?

          • 2. Re: Jboss 7.1.1 CLI Problem read message count in Queue
            stonesoft

            Unfortunately I don't have wildfly installed on this server.  Maybe I can put it on one of our test servers and give it a try tomorrow.  But do you know if my syntax was incorrect?  I just want to rule that out so I can make the case for trying to go to Wildfly 8

             

            thanks

            • 3. Re: Jboss 7.1.1 CLI Problem read message count in Queue
              jbertram

              Your syntax looks correct to me, but I don't work much on the application server (I'm a HornetQ developer). 

               

              In any case, AS 7.1.1 is really old at this point.  If you can't use the latest release of Wildfly for some reason then at least use the latest release of JBoss EAP (which is based on AS7 and has a ton of fixes beyond 7.1.1).

              • 4. Re: Jboss 7.1.1 CLI Problem read message count in Queue
                ctomc

                It should work, but bit more correct form would be something like this:

                 

                ./jboss-cli.sh --user=abc --password=def --controller=1.2.3.4:9990 -c --commands="/subsystem=messaging/hornetq-server=default/jms-queue=MyQueue:read-attribute(name=message-count)"

                 

                in short, connect is not needed, as you passed "-c" which means connect on start. and exit is not needed as it will exit anyway.

                 

                other change is the extra / before :read-attribute, i am not sure if first one is correct but should be the same.

                 

                in any case try with some newer version as there ware lots of known problems with messaging subsystem and how it exposed data via CLI.