You can use any Java Management Extensions (JMX)-compliant console, such as JConsole or MC4J to monitor the messages passed between the producer, the broker, and the consumer.
To monitor the messages using JConsole:
Ensure that the JAVA_HOME environment is set.
From a command prompt, run jconsole.
In the JConsole window, click the Advanced tab.
Enter the following into the JMX URL field.
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
Click .
Click the MBeans tab.
Under the node in the MBeans panel, expand .
Open and in the Attributes tab, check that the messages have been sent to the queue.