| author | Tony Garnock-Jones <tonyg@lshift.net> |
| Tue Sep 09 13:36:11 2008 +0100 (2008-09-09) | |
| changeset 52 | 8972d204473a |
| parent 48 | examples/ruby/topic-receiver.rb@f845403499a2 |
| permissions | -rw-r--r-- |
| tonyg@43 | 1 |
require 'rubygems' |
| tonyg@43 | 2 |
require 'stomp' |
| tonyg@43 | 3 |
|
| tonyg@43 | 4 |
conn = Stomp::Connection.open('guest', 'guest', 'localhost')
|
| tonyg@43 | 5 |
conn.subscribe('myqueue', :exchange => 'amq.topic', :routing_key => "x.#")
|
| tonyg@48 | 6 |
while mesg = conn.receive |
| tonyg@48 | 7 |
puts mesg.body |
| tonyg@43 | 8 |
end |