vendor/bundle/ruby/1.8/gems/activemessaging-0.9.0/lib/activemessaging/adapters/wmq.rb
def send(q_name, message_data, headers={})
          WMQ::QueueManager.connect(@connection_options) do |qmgr|
            qmgr.open_queue(:q_name => q_name, :mode => :output) do |queue|

              message_descriptor = headers[:descriptor] || {:format => WMQ::MQFMT_STRING}
              put_options = headers[:put_options].nil? ? {} : headers[:put_options].dup

              wmq_message = WMQ::Message.new(:data => message_data, :descriptor => message_descriptor)
              queue.put(put_options.merge(:message => wmq_message, :data => nil))
              return Message.new(wmq_message, q_name)
            end
          end
        end
# Send method needed by a13g
# headers may contains 2 different hashes to gives more control over the sending process
#   :descriptor => {...} to populate the descriptor of the message
#   :put_options => {...} to specify the put options for that message
Send method needed by a13g
headers may contains 2 different hashes to gives more control over the sending process
:descriptor => {...} to populate the descriptor of the message
:put_options => {...} to specify the put options for that message
Send method needed by a13g headers may contains 2 different hashes to gives more control over the sending process : descriptor = > { ... } to populate the descriptor of the message : put_options = > { ... } to specify the put options for that message
def send(q_name, message_data, headers={})
          WMQ::QueueManager.connect(@connection_options) do |qmgr|
            qmgr.open_queue(:q_name => q_name, :mode => :output) do |queue|
              message_descriptor = headers[:descriptor] || {:format => WMQ::MQFMT_STRING}
              put_options = headers[:put_options].nil? ? {} : headers[:put_options].dup
              wmq_message = WMQ::Message.new(:data => message_data, :descriptor => message_descriptor)
              queue.put(put_options.merge(:message => wmq_message, :data => nil))
              return Message.new(wmq_message, q_name)
            end
          end
        end
def send ( q_name , message_data , headers = { } ) WMQ :: QueueManager . connect ( @connection_options ) do | qmgr | qmgr . open_queue ( :q_name => q_name , :mode => :output ) do | queue | message_descriptor = headers [ :descriptor ] || { :format => WMQ :: MQFMT_STRING } put_options = headers [ :put_options ] . nil? ? { } : headers [ :put_options ] . dup wmq_message = WMQ :: Message . new ( :data => message_data , :descriptor => message_descriptor ) queue . put ( put_options . merge ( :message => wmq_message , :data => nil ) ) return Message . new ( wmq_message , q_name ) end end end
Send method needed by a13g
headers may contains 2 different hashes to gives more control over the sending process
:descriptor => {...} to populate the descriptor of the message
:put_options => {...} to specify the put options for that message
Send method needed by a13g headers may contains 2 different hashes to gives more control over the sending process : descriptor = > { ... } to populate the descriptor of the message : put_options = > { ... } to specify the put options for that message
q_name
message_data
headers