examples/resque/processor.rb in jruby-hornetq-0.4.0 vs examples/resque/processor.rb in jruby-hornetq-0.5.0.alpha

- old
+ new

@@ -19,20 +19,20 @@ # Create durable queue with matching address session.create_queue(q_name, q_name, true) rescue # Ignore when queue already exists end - + server = session.create_server(q_name, timeout) - puts "Waiting for Requests..." + puts "Waiting for Requests..." server.run do |request_message| print "." - + # Create Reply Message reply_message = session.create_message(HornetQ::Client::Message::TEXT_TYPE, false) reply_message.body = "Echo [#{request_message.body}]" - + # The result of the block is the message to be sent back, or nil if no reply reply_message end # Server will stop after timeout period after no messages received. Set to 0 to wait forever