Thanks for visiting the site !!! Visit below intrested Ads to support us if you like the site .Sharing is caring .keep distance and keep safe . Happy Learning ... 😀

How to Setup IBM MQ Gateway QMGR

A queue manager on which the interface queues are not located, but on which they are defined as cluster queues. Such a queue manager is called a gateway queue manager.

Sample Diagram for Gate Way QMGR

Created 3 QMGRS in TEST cluster

dis clusqmgr(*)
     2 : dis clusqmgr(*)
AMQ8441I: Display Cluster Queue Manager details.
   CLUSQMGR(FR1)                           CHANNEL(TO.FR1)
   CLUSTER(TEST)                        
AMQ8441I: Display Cluster Queue Manager details.
   CLUSQMGR(FR2)                           CHANNEL(TO.FR2)
   CLUSTER(TEST)                        
AMQ8441I: Display Cluster Queue Manager details.
   CLUSQMGR(GWQM)                          CHANNEL(TO.GWQM)
   CLUSTER(TEST)                        

Here FR1 and FR2 actually hold the interface queue .Ex QL1
Application connecting to GRQM doenst hold the actual Queue but puts a message into an interface queue because the queue is not managed by GWQM .GWQM checks its cluster queue defninitions.It recognizes that QL1 is managed by FR1,Fr2 so GWQM puts the message to QL1 on one of the QMGR’s (FR1,FR2). subsequent messages will be load balenced to FR1 and FR2

define ql(QL1) cluster(Test) defbind(notfixed)
Defined QL1 on Both FR1 and FR2

Sending 10 messages to QL1 using GWQM

bash-4.4$ cat put.sh 
 #!/bin/bash
 for i in `seq 10` ; do
  echo "Sending $i message"
  echo "Test MSG $i" |/opt/mqm/samp/bin/amqsput QL1 GWQM >/dev/null 2>&1
 done 
bash-4.4$

Verify the messages on FR1 QL1

bash-4.4$ /opt/mqm/samp/bin/amqsget QL1 FR1
Sample AMQSGET0 start
message <Test MSG 2>
message <Test MSG 4>
message <Test MSG 6>
message <Test MSG 8>
message <Test MSG 10>
no more messages
Sample AMQSGET0 end
bash-4.4$ 

Verify the messages on FR2 QL1

bash-4.4$ /opt/mqm/samp/bin/amqsget QL1 FR2
Sample AMQSGET0 start
message <Test MSG 1>
message <Test MSG 3>
message <Test MSG 5>
message <Test MSG 7>
message <Test MSG 9>
no more messages
Sample AMQSGET0 end
bash-4.4$ 

Messages can also be routed to a gateway queue manager from queue managers that are external to the cluster. Refer below Diagram .

Application have its own QMGR (non-cluster) and it connects to GWQM . If the Application side has another MQ cluster then GWQM will be used to OverLap two cluster’s

Related Posts

2 thoughts on “How to Setup IBM MQ Gateway QMGR

    1. Hi Andrew,
      Yes we can use Load balancer in front of QMGR’s to load balance the user request’s .Officially IBM support but not certified to use F5 or even IBM Hardware Load balancer . Refer below . Load balancer has to meet some requirements to support .Even after we configure if there is any issue then it will difficult to engage multiple teams and troubleshooting multiple layers .Instead all in MQ side will be easier for Administration & troubleshooting.

      Also if some one want to use F5 then WMQ should work with no problem with hardware/software IP load balancers such as BIG-IP by F5, provided that the load balancer meets the following requirements:

      -> The initial TCP packet could be sent to any of the queue managers in the network, but once the connection is established then any further TCP packets for the same connection must always be routed to the same queue manager (same server).

      -> The load balancer must conform to TCP/IP standards

      1- Some types of applications may not work well with IP load balancer with WMQ.

      -> Client applications expecting a response from the same queue manger where the request was sent. For example, a client application sends a request to a queue manager and expects a response from the same queue manager. If the client disconnects before getting a response from a queue in a specific queue manager and if the subsequent connection request goes to a different queue manager then the client will not get the response it was expecting.

      -> An application which makes two connections, one for put and one for get could go to different queue managers.

      -> Transactional (XA) Clients are not supported with load balancers unless all possible back-ends are within one z/OS Queue Sharing Group (QSG). Any other non-z/OS platforms environments are not supported because the queue manager does not support XA Clients when load balanced.

      2- Some load balancers might send ping requests to check the availability of the ports. If WMQ receives any data that does not follow WMQ communication protocol then WMQ generates FDCs to indicate the data received is invalid. It is possible to disable these FDCs in some cases.

      https://www.f5.com/services/resources/deployment-guides/ibm-websphere-mq-big-ip-v111-ltm

      Overall It is recommended to perform careful testing from the application perspective to ensure that the setup works before making any final implementation decisions.

      We don’t have much help from blogs also for LB support as not many people using it .

      From 9.2 we don’t need to thing of LB any more as that is new future with MQ . Refer below for more details

      https://askmiddlewareexpert.com/2021/04/05/setting-up-mq-unified-cluster/

      https://askmiddlewareexpert.com/2021/04/10/difference-between-uniform-cluster-and-traditional-mq-cluster/

      Thanks,
      AMEADMIN

Leave a Reply

Your email address will not be published. Required fields are marked *