examples/client/advanced/multi_client.rb in jruby-hornetq-0.2.1.alpha vs examples/client/advanced/multi_client.rb in jruby-hornetq-0.2.3.alpha
- old
+ new
@@ -24,10 +24,10 @@
def worker_thread(id, session_pool)
begin
# Obtain a session from the pool and return when complete
session_pool.requestor('jms.queue.ExampleQueue') do |session, requestor|
message = session.create_message(HornetQ::Client::Message::TEXT_TYPE,false)
- message << "Request Current Time"
+ message.body = "Request Current Time"
# Send message to the queue
puts "Thread[#{id}]: Sending Request"
if reply = requestor.request(message, $timeout)
puts "Thread[#{id}]: Received Response: #{reply.inspect}"
\ No newline at end of file