Name
activemq-admin browse — browse the contents of a destination
Synopsis
activemq-admin browse
{--amqurl brokerURL
} [--msgsel {msgsel...}] [--view {attr
...}] [[-Vheader] | [-Vcustom] | [-Vbody]] [--version] [[--help] | [-h] | [-?]] destName
Arguments
Argument | Description |
---|---|
--amqurl
| Specifies the URL of the broker to which you are connecting. |
--msgsel | Displays messages matched by the message selector. See Message filters. |
-Vheader
| Shows all the standard JMS message headers. |
-Vcustom | Shows all the custom fields added to each JMS message. |
-Vbody | Shows the body of the message. |
--view
| Selects the specific attribute of the message to view. |
-D | Sets a Java system property. For example,
-Dactivemq.home=C:/ActiveMQ . |
--version | Displays the version information. |
-h, -?, --help | Displays the online help for this command. |
Message filters
Message filters specified using the --msgsel
option take the form
.
Table B.1 lists the headers you can use to filter
messages.header
=value
Table B.1. Message Headers for Filtering
Name | Type |
---|---|
JMSCorrelationID | String |
JMSDeliveryMode | 1 -Non-Persistent, 2 -Persistent |
JMSDestination | javax.jms.Destination |
JMSExpiration | long |
JMSMessageID | String |
JMSPriority | int |
JMSRedelivered
| boolean |
JMSReplyTo | javax.jms.Destination |
JMSTimestamp | long |
JMSType | String |
Examples
The following command prints the JMS message header, custom message header, and message body of all the
messages in the queue TEST.FOO
on a broker:
c:\>
activemq-admin browse --amqurl tcp://localhost:61616 TEST.FOO
The following command displays the attributes from the body of the messages in the TEST.FOO
queue:
c:\>
activemq-admin browse --amqurl tcp://localhost:61616 -Vbody TEST.FOO
The following command displays any messages with an ID ending in 10
:
c:\>
activemq-admin browse --amqurl tcp://localhost:61616 --msgsel JMSMessaageID='*:10' TEST.FOO
The following command displays messages with a priority of 3
, enter:
c:\>
activemq-admin browse --amqurl tcp://localhost:61616 --msgsel JMSPriority=3 TEST.FOO
The message selectors from the preceding two examples can be combined as follows:
c:\>
activemq-admin browse --amqurl tcp://localhost:61616 --msgsel JMSMessaageID='*:10',JMSPriority=3 TEST.FOO