examples/ruby/topic-broadcast-receiver.rb
changeset 52 8972d204473a
child 237 1001ca6867cf
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/examples/ruby/topic-broadcast-receiver.rb	Tue Sep 09 13:36:11 2008 +0100
     1.3 @@ -0,0 +1,8 @@
     1.4 +require 'rubygems'
     1.5 +require 'stomp'
     1.6 +
     1.7 +conn = Stomp::Connection.open('guest', 'guest', 'localhost')
     1.8 +conn.subscribe('', :exchange => 'amq.topic', :routing_key => "x.#")
     1.9 +while mesg = conn.receive
    1.10 +  puts mesg.body
    1.11 +end