Friday, December 26, 2014

Using "Shared Channels" in a Queue Sharing Group

When IBM introduced the notion of "shared queues" in WebSphere MQ....this allowed organizations the ability for a more fault tolerant, continuously available environment. Along with this, is the ability to have shared channels.  In this post, I will be going over the set-up of using shared "sender" as well as shared "receiver" channels.

Shared Sender Channels:

In order to have a shared sender channel.....there are three/four items that need to be set-up.
       
         1. Define a transmission queue (XMITQ) that is shared within the QSG (Queue Sharing Group).

         2. Define a Group/Copy remote queue that uses the shared transmission queue defined in step 1.

         3. Define a Group/Copy Sender channel using the shared transmission queue defined in step 1.

         Optional: (For triggering)

         4. In the transmission queue definition, set trigger type to "F"irst, trigger set to "Y". In the  
             Initiation Queue name put SYSTEM.CHANNEL.INITQ and finally put the channel name in
             the Trigger Data.

Now, when a message arrives on the transmission queue, this channel will start on any queue manager in the QSG that has a channel initiator running.  Message sequence numbers will be tracked and stored on the SYSTEM.QSG.CHANNEL.SYNCQ...which is a shared queue in the QSG.

For sender channels....that is all that is needed to make them "shared".

Shared Receiver Channels:

Shared receiver channels will require a little more set-up, as we will need a separate listener started with a Inbound Disposition, INDISP set to GROUP.  This listener will need to be listening on a separate port than the listener task started with the INDISP of QMGR...the normal listener task for each queue manager.

So in your CHINIT task PROC, for the CSQINPX input dataset, you will have two start listener commands.  One for the QMGR and one for the GROUP.

START LISTENER PORT(1414) TRPTYPE(TCP) INDISP(QMGR)
START LISTENER PORT(1415) TRPTYPE(TCP) INDISP(GROUP)

Now, since each queue manager in the QSG will be listening on a different IP address, you will need to set-up a group IP (DVIPA) in Communications Server to be used by Sysplex Distributor, and have this group IP spray the connections across the channel initiators listening on the GROUP port.

Sample Set-up: (These are all fictitious IP addresses)

       VIPADEFINE     MOVE IMMEDIATE 255.255.255.0 57.202.125.200          
    VIPADISTRIBUTE DISTMETHOD SERVERWLM                                 
             57.202.125.200 PORT 1415 DESTIP 57.202.125.1  57.202.125.2                                                                    57.202.125.3  57.202.125.4 
   
In the sample above, we have a DVIPA (Dynamic VIPA) address of 57.202.125.200 created...and we have selected to have the connections coming on a 57.202.125.200 port 1415 distributed based on WLM rules to the four IP addresses listed after the DESTIP tag.  These four IP's are where the GROUP listener for each queue managers channel initiator are listening on port 1415.

For more specifics on the DVIPA options you can use, see the IBM Information Center.

When in incoming connection for a shared receiver channel comes in, it will get distributed to the least used channel initiator, and since we have a shared channel, the SYNCQ used for message sequence number tracking will be SYSTEM.QSG.CHANNEL.SYNCQ.  This SYNCQ is also a shared queue and can be seen by all queue managers in the QSG.

That is all there is to setting up shared sender and receiver channels.

Happy messaging!!!



   



1 comment:

  1. Good introduction on webshereMQ. The power of IBM WebSphere MQ is its flexibility combined with reliability, scalability, and security.
    Check this site tekslate for indepth tutorials websphere-mqs
    Go here if you’re looking for information on tutorials websphere-mqs


    ReplyDelete