Advertisement
Advertisement


Tool for posting test messages onto a JMS queue?


Question

Can anyone recommend a tool for quickly posting test messages onto a JMS queue? The tool should allow the user to enter some data, perhaps an XML payload, and then submit it to a queue? I know I could probably knock something up reasonably quickly to do this but I thought I'd ask first before reinventing the wheel. Cheers.

2018/12/11
1
22
12/11/2018 12:09:30 AM

Accepted Answer

This answer doesn't apply to all JMS brokers, but if you happen to be using Apache ActiveMQ, the web-based admin console (by default at http://localhost:8161/admin) allows you to manually send text messages to topics or queues. It's handy for debugging.

2008/09/03
17
9/3/2008 4:19:36 AM


The ActiveMQ's web-based admin console has a big deficiency - one cannot specify any headers / custom properties when posting a message.

I came across a neat FOSS tool that can post a message and also specify headers/properties:

http://sourceforge.net/projects/activemqbrowser/

HTH

2010/05/31

Apache JMeter is a tool (written for the Java platform) which allows:

  • sending messages to a queue ( point to point)

  • publishing/subscribing to a topic

  • sending both persistent and non persistent messages

  • sending text , map and object messages

Apache ActiveMQ includes a ProducerTool and a ConsumerTool example sources (Java) with many command-line configuration options. As it is based on the JMS API, using it with other message brokers should be easy with minor modifications.

2012/08/12

IBM provide a free, powerful command line tool called perfharness.

Although aimed at benchmarking JMS providers, it's really good at generating (and consuming) test messages. You can use data either generated randomly or taken from a file.

The power features include sending and consuming messages at a fixed rate, using a specific number of threads, using either JMS or native MQ, etc. It generates statistics telling you exactly how fast your queue is performing (hence the name).

The only down side is that it's not super intuitive, given the number of operations it supports.

2009/01/14

I recommend the approach of @Will and using the Web Console of ActiveMQ which lets you post messages and browse queues or delete messages easily.

Another approach I often use is to use a directory of files as sample data and use a Camel route to move the messages from the directory to a JMS queue - or to take them from a queue and save them to disk etc

e.g.

from("file://someDirectory").
  to("activemq:MyQueue");

This would move all the files from someDirectory and send them to an ActiveMQ queue called MyQueue. If you'd rather leave the files in place you can use the URI "file://someDirectory?noop=true".

For more details see

2008/09/16

Also if the JMS broker supports JMX like ActiveMQ does you can use JConsole to post message and do a lot more.

2008/09/03

Source: https://stackoverflow.com/questions/37969
Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Email: [email protected]