Sha256: 1f2f9b91c1b141970aa0b223fae3aa3011b679d9896fbb60c086d6dae379fd27
Contents?: true
Size: 660 Bytes
Versions: 2
Compression:
Stored size: 660 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::BYTES_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/advanced/bytes_producer.rb |
jruby-hornetq-0.2.3.alpha | examples/client/advanced/bytes_producer.rb |