From: Brian McCallister Date: 2006-10-06T03:03:27+09:00 Subject: Re: Enterprise-Ruby Wish List by Francis Cianfrocca On Oct 4, 2006, at 10:59 AM, Francis Cianfrocca wrote: > In my example, what I asked was: what if I offered you a message- > queueing > product *that supported JMS* ...... and happened to be written in > Ruby. > No one's asking you to learn a new language, that would be > singularly poor > marketing. ;-) My point with this example is that there are > elements of > today's application-support stack that could do with some major > improvements, and Ruby might be a good language to use for them. How about one written in Java which supports Ruby (and C, Python, PHP, Perl, C#, C++, Pike, as well as JMS)? 1) Install and start ActiveMQ ( http://incubator.apache.org/activemq/ ) 2) 'gem install stomp' or http://svn.codehaus.org/stomp/ruby/trunk/ 3) -- require 'stomp' client = Stomp::Client.new("username", "password", "localhost", 61613) client.subscribe("/queue/SOMETHING.NIBBLE") do |msg| puts msg.body end client.join -- require 'stomp' client = Stomp::Client.new("username", "password", "localhost", 61613) 10.times { client.send("/queue/SOMETHING.NIBBLE", "Hello!") } -- 4) See http://incubator.apache.org/activemq/stomp.html for more details on getting the exact behavior you want. 5) See http://dev.tirsen.com/trac/activemessaging for a framework around it which is designed to play nicely with a certain popular web framework in Ruby. 6) See also Gozirra ( http://www.germane-software.com/software/Java/ Gozirra/ ) for a lighter-weight messaging solution which supports the same spread of clients. -Brian