Ruby WMQ.

Ruby interface into WebSphere MQ (MQSeries) ®

Several examples have been put together to demonstrate how to use Ruby WMQ. They are also a good place to start when writing a new application.

The following examples are included in the gem and source package distributions available on RubyForge.

Put one message to a Queue (Without opening the queue)

put1_a.rb                               Plain text version

put1_b.rb                               Plain text version

put1_c.rb                               Plain text version

Put messages to a Queue

put_a.rb                                 Plain text version

put_b.rb                                 Plain text version

Read one message from a queue

get_a.rb                                  Plain text version

Reading Several messages from a Queue:

each_a.rb                               Plain text version

each_b.rb                              Plain text version

each_header.rb                   Plain text version

Connect using MQ Client connection

get_client.rb                         Plain text version

Put Messages to a Queue as a group

put_group_a.rb                   Plain text version

put_group_b.rb                  Plain text version

Put Messages to a Queue, including message headers

put_dlh.rb                             Plain text version

put_dynamic_q.rb            Plain text version

put_rfh.rb                             Plain text version

put_rfh2_a.rb                      Plain text version

put_rfh2_b.rb                      Plain text version

put_xmit_q.rb                     Plain text version

Writing multiple files to a queue, where each file is a separate message:

files_to_q.rb                         Plain text version                       files_to_q.cfg

Writing the contents of a queue to multiple files, where each message is a separate file:

q_to_files.rb                         Plain text version                       q_to_files.cfg

Sample “client” and “server” side applications for sending or processing requests

request.rb                              Plain text version

server.rb                                 Plain text version