Sha256: 83ea8091f56aabab19f324ccb25345b28bf69ecd362e229a60731ec6ae056bad

Contents?: true

Size: 453 Bytes

Versions: 3

Compression:

Stored size: 453 Bytes

Contents

#
# Sample : put() : Put a single message to a queue
#          Open the queue so that multiple puts can be performed
#
require 'wmq'

WMQ::QueueManager.connect(:q_mgr_name=>'REID') do |qmgr|
  qmgr.open_queue(:q_name=>'TEST.QUEUE', :mode=>:output) do |queue|

    # First message
    queue.put(:data => 'Hello World')

    # Second message
    #   This message will have new message and correlation id's
    queue.put(:data => 'Hello Again')
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
ferocia-rubywmq-2.1.1 examples/put_a.rb
rubywmq-2.1.1 examples/put_a.rb
rubywmq-2.1.0 examples/put_a.rb