How to see information on each message in a queue
Problem
You want to check the messages you are sending for error checking or validation but don’t know how to do that.
Prerequisite
Download Solace Java or .NET APIs
Download SDKPerf
Solution
You can do that in two ways:
- Option 1: Use a queue browser with either the Solace Java or .NET API or SDKPerf
- Option 2: Use Solace Command Line Interface (CLI)
For both options, make sure that at the end you log in to PubSub+ Manager to see that the messages are still spooled on the queue.
Option 1: A -- Use a queue browse with the Solace Java or .NET API
To see information on each message in a queue using the Solace Java or .NET API, follow these steps.
Option 1: B – Use a queue browser with SDKPerf
With SDKPperf, you can add a -md flag to dump the message to the screen to see the message as your queue browser.
To see information on each message in a queue using SDKPerf for testing, follow these steps:
Type the command
_sdkperf_java -cip tcp://<ip address>:5555 -cu <client_username>@<vpn> -pql=<queue> -mt=persistent -mn=<number of messages to send>_
to write messages to a queue with no consumers.Here is an example:
sdkperf_java_d34 -cip tcp://192.168.133.47:55555 -cu wade_cu@wade_vpn -pql=wade_q -mt=persistent -mn=10 -msa=100
Type the command
_sdkperf_java -cip tcp://<ip address>:5555 -cu <client_username>@<vpn> -sql=<queue> -md -qb_
to browse the messages with a queue browser.Here is an example:
sdkperf_java_d34 -cip tcp://192.168.133.47:55555 -cu wade_cu@wade_vpn -sql=wade_q –qb -md
Option 2
To see information on each message in a queue without consuming them using Solace CLI, follow these steps:
- Log in to the CLI through either the management console or Secure Shell (SSH) connections.
- Type the command
_show queue <queueName> message-vpn <vpnName> message detail_
.
The output shows you the information on each message in the queue, such as the date spooled, the message size, and the sequence number.
Result
You should be able to see the information on each message in your queue now.
Learn more
*Documentation: Browsing Guaranteed Messages
Comments
-
Learn more
*Documentation: Browsing Guaranteed MessagesSeems the link is dead. I would be interested to get one message instance in the message browser (Java) without looping over the whole set of messages.
0 -
Thanks @pruffieux, link fixed!
0