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.

Was it helpful?

Solution

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.

OTHER TIPS

HermesJMS seems to be a rather powerful client for interacting with JMS providers. In my opinion, it is pretty unintuitive and hard to set up, though. (At least I'm mostly failing at it...)

Other, more user-friendly clients are often vendor-specific. Sonic Message Manager is a very nice and simple-to-use open-source JMS client for SonicMQ. It would be great to have a client like that working with different providers.

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

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.

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

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.

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

ActiveMQ has a web console for sending test messages (like mentioned above), but if your provider doesn't have this, it might be easiest to just write a console app/web page to post test messages. Sending a message in JMS isn't too hard, you might get the most benefit just writing your own test client.

If you can use Spring in Java, it has some really powerful utilities, check out the JmsTemplate.

I'm not aware of a simple client. I remember looking for one a long time ago when I researched different queue systems and trying JMS I couldn't find one then, and I couldn't find one now. One thing though - there are a ton of tutorials that get you started and you could do a simple form to achieve that.

Sorry to be not more helpful.

I have built a GUI tool for administering Open Source JMS Servers (Currently Activemq and Hornetq). It can send and receive messages and most of the usual stuff, as well as aggregate queues and topics into logical "groups".

Its a commercial product but the BETA is free and is fully functional.

try it out at http://www.rockeyesoftware.com/

For ActiveMQ the examples directory holds scripts. For Rubyists, look at example/ruby/stompcat.rb and catstomp.rb for subscribing and publishing.

I'm a brazilian developer and I made a Java program for Post HTTP and JMS Messages his available for download at: https://sites.google.com/site/felipeglino/softwares/posttool

In thath page you can found english instructions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top