tags:

views:

3245

answers:

9

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.

A: 

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.

Till
+8  A: 

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.

Will
+2  A: 

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

Bernie Perez
+4  A: 

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.

Christian Berg
SonicMQ provide a JMS test client that can connect to any JMS enablmed server. Though I don't know is it is available as a free download.
Vincent Robert
+2  A: 

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

James Strachan
+1  A: 

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.

Air
+1  A: 

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.

Andy White
A: 

Apache JMeter is a tool (written for the Java platform) which also includes JMS tests.

Apache ActiveMQ includes a ProducerTool and a ConsumerTool example sources (Java) with many command-line configuration options, however it works only with ActiveMQ.

mjustin
+1  A: 

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

Oleg Kiorsak