Sha256: bd65e7d11023b2945c1857cfdf35b2cdb06e0f5ae90ddacd15652166af823ad4
Contents?: true
Size: 656 Bytes
Versions: 2
Compression:
Stored size: 656 Bytes
Contents
# # HornetQ Producer: # Write messages to the queue # # Allow examples to be run in-place without requiring a gem install $LOAD_PATH.unshift File.dirname(__FILE__) + '/../../lib' require 'rubygems' require 'hornetq' HornetQ::Client::Factory.session('hornetq://localhost') do |session| # Create Producer so that we can send messages to the Address 'jms.queue.ExampleQueue' producer = session.create_producer('jms.queue.ExampleQueue') # Create a non-durable message to send message = session.create_message(HornetQ::Client::Message::TEXT_TYPE,false) message.body = "#{Time.now}: ### Hello, World ###" producer.send(message) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jruby-hornetq-0.2.5.alpha | examples/client/producer.rb |
jruby-hornetq-0.2.3.alpha | examples/client/producer.rb |