23

Can anyone recommend a tool for quickly posting test messages onto a JMS queue?

Description:

  1. The tool should allow the user to enter some data, perhaps an XML payload, and then submit it to a queue.
  2. I should be able to test consumer without producer.
chetan mahajan
  • 723
  • 7
  • 9
ryan
  • 5,039
  • 13
  • 35
  • 42

12 Answers12

19

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,123
  • 2
  • 15
  • 15
  • Can you also share some info on how to add jms properties using that console? I can add the message body but not the headers – bschandramohan Feb 17 '14 at 08:37
  • I just experience some issues with this way. I need to pipe in 26 messages and 6 get rejected for some reason. – mvw Jun 01 '17 at 14:17
  • I have same problem: sending messages with custom header for debugging purpose. Apparently this problem is common and there are no answers. – Giuseppe Adaldo Jun 21 '17 at 10:53
13

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
  • 14,246
  • 9
  • 39
  • 44
  • 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 Jun 07 '09 at 13:52
11

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
  • 111
  • 1
  • 6
6

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.

mjn
  • 36,362
  • 28
  • 176
  • 378
  • I know its been a long time. The Jmeter Im using creates a new connectionfactory for each thread (as per number of threads given in thread pool option). How do I make sure that it uses just one qConnectionFactory and reuse them throughout? – Chillax Sep 05 '12 at 09:42
4

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
  • 5,084
  • 5
  • 25
  • 19
3

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
  • 9,168
  • 34
  • 31
2

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

Bernie Perez
  • 12,513
  • 13
  • 46
  • 55
1

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
  • 86,444
  • 48
  • 176
  • 211
0

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

eebbesen
  • 5,070
  • 8
  • 48
  • 70
0

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
  • 22,236
  • 4
  • 59
  • 89
0

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/

NullPumpkinException
  • 1,396
  • 1
  • 18
  • 22
-4

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.