Questo contenuto non è disponibile nella lingua selezionata.

Chapter 3. ActiveMQ Console Commands


The activemq commands allow you to view and manage the brokers and messages.
Type activemq: then press Tab at the prompt to view the available commands.

3.1. activemq:browse, browse

Abstract

displays messages on a specified destination

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

Table 3.1, “activemq:browse Arguments” describes the command's arguments.
Expand
Table 3.1. activemq:browse Arguments
ArgumentInterpretation
--amqurl brokerURL Specifies the URL of the broker to which you are connecting.
--msgsel msgsel1,msgsel2,...Displays messages matched by the message selector.
--factory classNameLoad className as the javax.jms.ConnectionFactory to use for creating connections.
--passwordFactory classNameLoad className as the org.apache.activemq.console.command.PasswordFactory for retrieving the password from a keystore.
--user usernameUsername to use for JMS connections.
--password passwordPassword to use for JMS connections.
-Vheader Shows all the standard JMS message headers.
-VcustomShows all the custom fields added to each JMS message.
-VbodyShows the body of the message.
--view attr1,attr1,... Selects the specific attribute of the message to view.
--versionDisplays the version information.
-h, -?, --helpDisplays the online help for this command.

Message filters

Message filters specified using the --msgsel option take the form header=value. Table 3.2, “Message Headers for Filtering” lists the headers you can use to filter messages.
Expand
Table 3.2. Message Headers for Filtering
NameType
JMSCorrelationIDString
JMSDeliveryMode1-Non-Persistent, 2-Persistent
JMSDestinationjavax.jms.Destination
JMSExpirationlong
JMSMessageIDString
JMSPriorityint
JMSRedelivered boolean
JMSReplyTojavax.jms.Destination
JMSTimestamplong
JMSTypeString

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:
JBossA-MQ:karaf@root>activemq:browse --amqurl tcp://localhost:61616 TEST.FOO
Copy to Clipboard Toggle word wrap
The following command displays the attributes from the body of the messages in the TEST.FOO queue:
JBossA-MQ:karaf@root>activemq:browse --amqurl tcp://localhost:61616 -Vbody TEST.FOO
Copy to Clipboard Toggle word wrap
The following command displays any messages with an ID ending in 10:
JBossA-MQ:karaf@root>activemq:browse --amqurl tcp://localhost:61616 --msgsel JMSMessaageID='*:10' TEST.FOO
Copy to Clipboard Toggle word wrap
The following command displays messages with a priority of 3, enter:
JBossA-MQ:karaf@root>activemq:browse --amqurl tcp://localhost:61616 --msgsel JMSPriority=3 TEST.FOO
Copy to Clipboard Toggle word wrap
The message selectors from the preceding two examples can be combined as follows:
JBossA-MQ:karaf@root>activemq:browse --amqurl tcp://localhost:61616 --msgsel JMSMessaageID='*:10',JMSPriority=3 TEST.FOO
Copy to Clipboard Toggle word wrap
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat