activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiram Chirino" <hi...@hiramchirino.com>
Subject Re: Is 'query' broken in RC3?
Date Thu, 04 May 2006 04:14:12 GMT
patches are welcomed!  ;-)

On 5/1/06, Jason Dillon <Jason.Dillon@paybytouch.com> wrote:
> I've been trying really hard to figure out the right combination of
> flags to pass to query to get it to produce anything meaningful...
> with not much luck.
>
> I've got my broker listening for JMX on a different port, so I have
> to pass it --jmxurl service:<cut> (and not I did not actually pass it
> <cut>, but a valid string... just adding it here to show that I must
> always pass this in).
>
> Lets say I want to display all of the Queue's, this is what I am lead
> to believe by the docs is the right flags:
>
>      ./query --jmxurl service:<cut> -QQueue=*
>
> This spits out:
>
> ACTIVEMQ_HOME: ...
>
> And then exists.  Not very useful.  If I run with no flags (other
> than the --jmxurl) I get a ton of stufff, one of them being:
>
> <snip>
> Type = Queue
> Destination = BUILD.TASKS
> QueueSize = 1022
> DequeueCount = 8467
> MemoryPercentageUsed = 0
> ConsumerCount = 22
> MemoryLimit = 9223372036854775807
> EnqueueCount = 1475
> BrokerName = localhost
> </snip>
>
> So, why doesn't this Queue show up when I say -QQueue=*?  If I
> specify the full name it does not work either:
>
>      ./query --jmxurl service:<cut> -QQueue=BUILD.TASKS
>
> I'm not sure that -xQ works either, since this:
>
>      ./query --jmxurl service:<cut> -xQTopic=ActiveMQ.Advisory.*
>
> Spits out stuff that includes:
>
> <snip>
> Type = Topic
> Destination = ActiveMQ.Advisory.Producer.Topic.BUILD.PING
> QueueSize = 0
> DequeueCount = 0
> MemoryPercentageUsed = 0
> ConsumerCount = 0
> MemoryLimit = 9223372036854775807
> EnqueueCount = 27
> BrokerName = localhost
> </snip>
>
> Seems like the -xQ and -Q stuff just does not work.  --objname seems
> to work better.  For example, to list all Queue's:
>
>      ./query --jmxurl service:<cut>  --objname Type=Queue
>
> This actually does what I expect.  So does:
>
>      ./query --jmxurl service:<cut> --objname
> Type=Topic,Destination=BUILD.*
>
> Furthermore, query does not parse its command line options very
> well.  It should allow long options with values to be defined as --
> opt=value or --opt value, but it does not support the first, but it
> will recognice that you are trying to use the --opt flag.  For example:
>
>      ./query --jmxurl service:<cut> --objname Type=Topic --
> xobjname=Destination=ActiveMQ.Advisory.*
>
> This will complain with:
>
>      ERROR: java.lang.IllegalArgumentException: Object name query not
> specified
>
> But this works...
>
>          ./query --jmxurl service:<cut> --objname Type=Topic --
> xobjname=Destination=ActiveMQ.Advisory.* Destination=ActiveMQ.Advisory.*
>
> And it does the right thing... which seems quite insane to me.
>
> I would also recommend that if an option parsing or handing error
> occurs to just exit... since chances are the output is not going to
> be what the user wanted.  Currently, the above ERROR continued to
> spit out all Topics (including all ActiveMQ.Advisory.* stuff) which
> is not what I wanted.
>
> I highly recommending using Commons CLI http://jakarta.apache.org/
> commons/cli (or something similar) to get consistent posix-style
> command line argument parsing.
>
>   * * *
>
> Is anyone actively testing these admin features for the 4.0 release?
> So far I have not had much luck with any of them to get useful stuff
> that a sysadmin might want to see.
>
> I did play with `browse` a little, and noticed that it just caused a
> bunch of exceptions to be thrown on the server-side.
>
> :-(
>
> --jason
> This email and any attachment(s) thereto, are intended for the use of
> the addressee(s) named herein and may contain legally privileged and or
> confidential information under applicable law. If you are not the
> intended recipient of this e-mail, you are hereby notified any
> dissemination, distribution or copying of this email, and any attachment(s)
> thereto, is strictly prohibited. If you have received this communication
> in error, please notify the sender at 415-281-2200 or via return e-mail at
> postmaster@paybytouch.com and permanently delete the original copy and
> any copy of any e-mail, and any printout thereof. Thank you for your
> cooperation.
>
>


--
Regards,
Hiram

Mime
View raw message