Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 3. ActiveMQ Console Commands
activemq:
then press Tab at the prompt to view the available commands.
3.1. activemq:browse, browse
Abstract
Synopsis
activemq:browse
{
--amqurl brokerURL
} [
--msgsel
{
msgsel
...}
] [
--factory className
] [
--passwordFactory className
] [
--user username
] [
--password password
] [
--view
{
attr
...}
] [[
-Vheader
] | [
-Vcustom
] | [
-Vbody
]] [
--version
] [[
--help
] | [
-h
] | [
-?
]]
destName
Arguments
Argument | Interpretation |
---|---|
--amqurl brokerURL | Specifies the URL of the broker to which you are connecting. |
--msgsel msgsel1,msgsel2,... | Displays messages matched by the message selector. |
--factory className | Load className as the javax.jms.ConnectionFactory to use for creating connections. |
--passwordFactory className | Load className as the org.apache.activemq.console.command.PasswordFactory for retrieving the password from a keystore. |
--user username | Username to use for JMS connections. |
--password password | Password to use for JMS connections. |
-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 attr1,attr1,... | Selects the specific attribute of the message to view. |
--version | Displays the version information. |
-h, -?, --help | Displays the online help for this command. |
Message filters
--msgsel
option take the form header=value
. Table 3.2, “Message Headers for Filtering” lists the headers you can use to filter messages.
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
TEST.FOO
on a broker:
JBossA-MQ:karaf@root>
activemq:browse --amqurl tcp://localhost:61616 TEST.FOO
TEST.FOO
queue:
JBossA-MQ:karaf@root>
activemq:browse --amqurl tcp://localhost:61616 -Vbody TEST.FOO
10
:
JBossA-MQ:karaf@root>
activemq:browse --amqurl tcp://localhost:61616 --msgsel JMSMessaageID='*:10' TEST.FOO
3
, enter:
JBossA-MQ:karaf@root>
activemq:browse --amqurl tcp://localhost:61616 --msgsel JMSPriority=3 TEST.FOO
JBossA-MQ:karaf@root>
activemq:browse --amqurl tcp://localhost:61616 --msgsel JMSMessaageID='*:10',JMSPriority=3 TEST.FOO