Generic Stomp Client

I’ve been playing a bit with Stomp and ActiveMQ to help with some of my distributed management problems so needed a nice generic client for it.

I wrote one in Ruby, the code can be found here, you’ll need the Stomp rubygem to use it.

To use it set environment variables STOMP_USER and STOMP_PASSWORD and run it as below, you can also pass the user/pass to it as command line options but that will expose your password in ps output.

% stompclient --server your.server
AMQ> subscribe /topic/foo
Subscribing to /topic/foo
AMQ> /topic/foo bar
Sending 'bar' to /topic/foo
13:48:49:/topic/foo> bar
AMQ> detail
No longer showing details
AMQ> /topic/foo bar
Sending 'bar' to /topic/foo
bar

So it’s just a simple little frontend, it uses Ruby’s readline library which slows things down a bit as it does some blocking polling of input, if you’re sending loads of messages directed at this client it will seem a bit sluggish, unavoidable unfortunately.

Tags: , ,

Trackbacks/Pingbacks

  1. ActiveMQ Clustering « www.devco.net - 10. Nov, 2009

    [...] can also test using my generic stomp client that I posted in the past Share this on del.icio.usDigg [...]

Leave a Reply