{"id":440,"date":"2009-03-17T13:45:15","date_gmt":"2009-03-17T12:45:15","guid":{"rendered":"http:\/\/wp.devco.net\/?p=440"},"modified":"2010-12-18T21:05:05","modified_gmt":"2010-12-18T20:05:05","slug":"generic_stomp_client","status":"publish","type":"post","link":"https:\/\/www.devco.net\/archives\/2009\/03\/17\/generic_stomp_client.php","title":{"rendered":"Generic Stomp Client"},"content":{"rendered":"

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

I wrote one in Ruby, the code can be found here<\/a>, you’ll need the Stomp rubygem to use it.<\/p>\n

To use it set environment variables STOMP_USER<\/i> and STOMP_PASSWORD<\/i> 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<\/i> output.<\/p>\n

<\/p>\n

\r\n% stompclient --server your.server\r\nAMQ> subscribe \/topic\/foo\r\nSubscribing to \/topic\/foo\r\nAMQ> \/topic\/foo bar\r\nSending 'bar' to \/topic\/foo\r\n13:48:49:\/topic\/foo> bar\r\nAMQ> detail\r\nNo longer showing details\r\nAMQ> \/topic\/foo bar\r\nSending 'bar' to \/topic\/foo\r\nbar\r\n<\/pre>\n

<\/code>
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.<\/p>\n","protected":false},"excerpt":{"rendered":"

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 […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","footnotes":""},"categories":[7],"tags":[121,36,13],"_links":{"self":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/440"}],"collection":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/comments?post=440"}],"version-history":[{"count":5,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/440\/revisions"}],"predecessor-version":[{"id":1881,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/440\/revisions\/1881"}],"wp:attachment":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/media?parent=440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/categories?post=440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/tags?post=440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}