<p>I've found a nice little tool called <strong>amqutil  </strong>for quickly producing /consuming and browsing test messages on ActiveMQ.</p>
<p>You can learn more and download this tool from <a href="http://kevinboone.net/README_amqutil.html" target="_blank">http://kevinboone.net/README_amqutil.html</a></p>
<p>So amqutil is a simple Java command-line utility for testing and exercising ActiveMQ destinations as a JMS client. It works with the open-source Apache ActiveMQ, and with Red Hat JBoss Fuse and JBoss A-MQ.</p>
<p>Once downloaded you can simply execute it as a java jar class:</p>
<pre class="brush:bash">java -jar amqutil-0.1.0.jar &lt;command&gt; &lt;options&gt;</pre>
<p>Let's see for example how to <strong>produce</strong> 10 messages on the Queue examplequeue:</p>
<pre class="brush:bash">java -jar amqutil-0.1.0.jar produce 10 --destination examplequeue</pre>
<p> You can count the messages in a queue with the <strong>count</strong> command:</p>
<pre class="brush:bash">java -jar amqutil-0.1.0.jar count --destination examplequeue
Messages on examplequeue: 10</pre>
<p> You can browse for messages using the <strong>browse</strong> command:</p>
<pre class="brush:bash">java -jar amqutil-0.1.0.jar browse --destination examplequeue
     0 ID:francesco-PC-59414-1432392576974-1:1:1:1:1 TextMessage
     1 ID:francesco-PC-59414-1432392576974-1:1:1:1:2 TextMessage
     2 ID:francesco-PC-59414-1432392576974-1:1:1:1:3 TextMessage
     3 ID:francesco-PC-59414-1432392576974-1:1:1:1:4 TextMessage
     4 ID:francesco-PC-59414-1432392576974-1:1:1:1:5 TextMessage
     5 ID:francesco-PC-59414-1432392576974-1:1:1:1:6 TextMessage
     6 ID:francesco-PC-59414-1432392576974-1:1:1:1:7 TextMessage
     7 ID:francesco-PC-59414-1432392576974-1:1:1:1:8 TextMessage
     8 ID:francesco-PC-59414-1432392576974-1:1:1:1:9 TextMessage
     9 ID:francesco-PC-59414-1432392576974-1:1:1:1:10 TextMessage</pre>
<p> You can consume messages using the <strong>consume</strong> command which can be followed by the number of messages to consume (starting from the head of the queue):</p>
<pre class="brush:bash">java -jar amqutil-0.1.0.jar consume --destination examplequeue 5
ID:francesco-PC-59414-1432392576974-1:1:1:1:1 TextMessage
ID:francesco-PC-59414-1432392576974-1:1:1:1:2 TextMessage
ID:francesco-PC-59414-1432392576974-1:1:1:1:3 TextMessage
ID:francesco-PC-59414-1432392576974-1:1:1:1:4 TextMessage
ID:francesco-PC-59414-1432392576974-1:1:1:1:5 TextMessage</pre>
<p> </p>
<p> </p>
<p> </p>