Overlapping WebSphere MQ V7.5 clusters for high availability

This article shows you how to create a high-availability (HA) WebSphere MQ implementation using overlapping clusters and the namelist. It also shows you how to test the setup by creating an alias queue on the bridge queue manager.

Gautam K. Bhat (gautambh@in.ibm.com), Senior Certified IT Specialist, IBM

Photo of Gautam K. BhatGautam K. Bhat is an IBM Senior Certified IT Specialist, Chief Architect for Americas clients, and Global Subject Matter Expert for Messaging, Integration, and Middleware. He is involved in training and coaching at the Middleware Center of Excellence (CoE) for IBM Global Technology Services for strategic outsourcing in India. His professional certifications include Sun Certified Business Component Developer, Sun Certified Java Programmer, Sun Certified Web Component Developer, Service Oriented Architecture Associate, WebSphere Message Broker Administrator, and WebSphere MQ Administrator. You can contact Gautam at gautambh@in.ibm.com.



Arundeep B. Veerabhadraiah (arundeepbv@in.ibm.com), Certified IT Specialist, IBM

Photo of Arundeep B. VeerabhadraiahArundeep B. Veerabhadraiah is a Certified IT Specialist focusing on WebSphere Message Broker and WebSphere MQ. He has an M.S. Degree in Computer Science from the University of Illinois, and has seven years of experience in Enterprise Application Integration.



15 January 2014

Introduction

This article describes an IBM® WebSphere® MQ environment with nine queue managers and three different clusters. The three clusters are named AMERICA, EUROPE, and INDIA, and each cluster has two full repositories and one partial repository. Each queue manager is part of one cluster, and namelists will be used to enable communication between the three clusters. The diagram and table below summarize the setup:

Figure 1
Figure 1
Table 1
Cluster nameQueue managerReceiver channelFull ReposYes / Noport
INDIANEWDELHITO.NEWDELHIYES1414
BOMBAYTO.BOMBAYYES1415
BANGALORETO.BANGALORENO1416
EUROPELONDONTO.LONDONYES1417
PARISTO.PARISYES1418
BERLINTO.BERLINNO1419
AMERICANEWYORKTO.NEWYORKYES1420
CHICAGOTO.CHICAGOYES1421
LOSANGELESTO.LOSANGELESNO1422

Architecture for overlapping clusters

The BOMBAY queue manager, which is part of the INDIA cluster, will be used as a gateway to communicate with the other clusters. The queue manager will be made part of all three clusters -- AMERICA, EUROPE, and INDIA:

Figure 2
Figure 2

Terminology

Overlapping clusters

You can create clusters that overlap, for various reasons, such as:

  • To let different organizations have their own administration
  • To enable independent applications to be administered separately
  • To create classes of service

Namelists

A namelist is a WebSphere MQ object that contains a list of other WebSphere MQ objects, such as cluster names, queue names, or authentication information object names. In a cluster, it can be used to identify a list of clusters for which the queue manager holds the repositories. Namelists are used by queue manager clusters to maintain a list of clusters referenced by more than one WebSphere MQ object. Typically, namelists are used by applications such as trigger monitors, where they are used to identify a group of queues.

Queue aliases

A queue alias (QALIAS) definition provides an alias by which a queue is known to applications. You can create a QALIAS definition on a queue manager using the DEFINE QALIAS command. For example, the command DEFINE QALIAS(QA.BOMBAY) TARGQ(QL.BOMBAY) advertises a queue called QA.BOMBAY with the target queue QL.BOMBAY. When an application puts a message on the alias queue, the message is routed to the target queue.

Configuring overlapping clusters

In order to create overlapping clusters, the queue manager BOMBAY will be made part of the three clusters AMERICA, EUROPE, and INDIA, and BOMBAY will serve as the bridge between the three clusters. You start by creating a namelist on the bridge queue manager, which is then made part of the three clusters by creating the required cluster sender and receiver channels. Here are the detailed instructions:

  1. Create a namelist called GLOBAL on the BOMBAY queue manager:
    DEFINE NAMELIST (GLOBAL) NAMES ('AMERICA', EUROPE', 'INDIA')
  2. Make the BOMBAY queue manager part of the three clusters by altering the REPOSNL attribute. To specify that a queue manager holds a full repository for several clusters, use the attribute REPOSNL(namelist) on the ALTER QMGR command:
    ALTER QMGR REPOS(' ')  REPOSNL(GLOBAL)
  3. The TO.BOMBAY clusrcvr channel is a component only in the INDIA cluster. To make it part of all the three clusters, alter the channel by specifying the GLOBAL namelist in the CLUSNL attribute. The CLUSNL contains the name of the namelist that specifies a list of clusters to which the channel belongs:
    ALTER CHANNEL(TO.BOMBAY) CHLTYPE(CLUSRCVR) CLUSTER('') CLUSNL(GATEWAY)
  4. The cluster receiver channel for the BOMBAY queue manager is now defined and advertised in all three clusters. The next step is to create a cluster sender channel to the full repositories of the EUROPE and AMERICA clusters. As a part of the initial setup of the INDIA cluster, the cluster sender channel from BOMBAY to NEWDELHI already exists. After these sender channels are created, the BOMBAY queue manager will be able to communicate with the full repositories of all the three clusters:
    :
    DEFINE CHANNEL(TO.LONDON) CHLTYPE(CLUSSDR) CONNAME('localhost(1417)') CLUSTER (EUROPE)
    DEFINE CHANNEL(TO.CHICAGO) CHLTYPE(CLUSSDR) CONNAME('localhost(1421)') CLUSTER (AMERICA)
  5. The only remaining step is to enable the full repositories of the cluster to communicate with the BOMBAY queue manager, which you do by creating the cluster sender channels from the LONDON and CHICAGO queue managers to the BOMBAY queue manager:
    • On the LONDON queue manager run the command:
      DEFINE CHANNEL(TO.BOMBAY) CHLTYPE(CLUSSDR) CONNAME('localhost(1415)') CLUSTER(EUROPE)
    • On the CHICAGO queue manager run the command:
      DEFINE CHANNEL(TO.BOMBAY) CHLTYPE(CLUSSDR) CONNAME('localhost(1415)') CLUSTER(AMERICA)

You have now created the overlapping clusters AMERICA, EUROPE, and INDIA, with the BOMBAY queue manager acting as a gateway between the three clusters.

Validating the setup

To validate the setup, run a display cluster queue manager command on the BOMBAY queue manager. All of the full repositories from the three clusters should be visible from the BOMBAY queue manager, and all of the cluster sender and cluster receiver channels should be in the running state. Here are the results of running the DIS CLUSQMGR(*) command on the BOMBAY queue manager:

Figure 3
Figure 3

Sending messages from one cluster to another

Consider a scenario in which one application connecting to a queue manager in one cluster needs to put a message on a local queue hosted on a different cluster. An application connecting to the queue manager BANGALORE, which is part of the INDIA cluster, needs to put a message on a local queue hosted on the PARIS queue manager, hosted in the EUROPE cluster. You can do this by creating a queue alias on the gateway queue manager. The table and graphic below summarize the cluster queue set-up:

Application nameLocal queue managerCluster alias queue nameDestination queue managerDestination queue name
APP1BANGALOREQA.BOMBAY.Q1.PARISPARISQL.1.PARIS
Figure 4
Figure 4

The messages will be routed to the destination queue managers through the gateway queue manager MARS. The concept of queue manager alias will be used to route the messages to the destination queue manager. The table above shows the required queue manager alias on the application queue managers and the gateway queue manager MARS.

Here are the commands to create the queue manager alias on the gateway server and the local queue on the PARIS queue manager:

  1. Run the following command to create the queue alias on the BOMBAY queue manager:
    DEFINE QA(QA.BOMBAY.PARIS) TARGQ(QL.PARIS) CLUSTER (INDIA) DEFBIND (NOTFIXED)

    An application connected to a queue manager in the INDIA cluster (such as BANGALORE) can now put a message to a queue, which it refers to QA.BOMBAY.Q1.PARIS, and this message is routed to QL.1.PARIS at the PARIS queue manager.

  2. When you open a queue, you need to set DEFBIND to either (NOTFIXED) or (QDEF), because if it is left as the default (OPEN), the queue manager will resolve the alias definition to the bridge queue manager(BOMBAY) that hosts it, and the bridge will not forward the message on.
  3. On the PARIS queue manager create the local queue call QL.1.PARIS:
    DEFINE QL(QL.1.PARIS ) CLUSTER (EUROPE)

Testing the setup

You can test the setup using the amsqput application. Create a separate section called Validation. Connect to the BANGALORE queue manager and put a message on the QA.BOMBAY.PARIS cluster queue. The message should reach the destination queue QL.PARIS on the PARIS queue manager. Use the following the command to run the test:

amqsput QA.BOMBAY.PARIS BANGALORE

Here are the results of the test:

Figure 5
Figure 5

Conclusion

This article showed you how to implement overlapping clusters with WebSphere MQ by using namelists. It also showed you how to test the setup by creating an alias queue on the bridge queue manager.

Resources

  • WebSphere MQ resources
  • WebSphere resources
    • developerWorks WebSphere
      Technical information and resources for developers who use WebSphere products. developerWorks WebSphere provides downloads, how-to information, support resources, and a free technical library of more than 2000 technical articles, tutorials, best practices, IBM Redbooks, and product manuals.
    • developerWorks WebSphere application integration developer resources
      How-to articles, downloads, tutorials, education, product info, and other resources to help you build WebSphere application integration and business integration solutions.
    • Most popular WebSphere trial downloads
      No-charge trial downloads for key WebSphere products.
    • WebSphere forums
      Product-specific forums where you can get answers to your technical questions and share your expertise with other WebSphere users.
    • WebSphere demos
      Download and watch these self-running demos, and learn how WebSphere products can provide business advantage for your company.
    • WebSphere-related articles on developerWorks
      Over 3000 edited and categorized articles on WebSphere and related technologies by top practitioners and consultants inside and outside IBM. Search for what you need.
    • WebSphere-related books from IBM Press
      Convenient online ordering through Barnes & Noble.
    • WebSphere-related events
      Conferences, trade shows, Webcasts, and other events around the world of interest to WebSphere developers.
  • developerWorks resources
    • Trial downloads for IBM software products
      No-charge trial downloads for selected IBM® DB2®, Lotus®, Rational®, Tivoli®, and WebSphere® products.
    • developerWorks business process management developer resources
      BPM how-to articles, downloads, tutorials, education, product info, and other resources to help you model, assemble, deploy, and manage business processes.
    • developerWorks blogs
      Join a conversation with developerWorks users and authors, and IBM editors and developers.
    • developerWorks tech briefings
      Free technical sessions by IBM experts to accelerate your learning curve and help you succeed in your most challenging software projects. Sessions range from one-hour virtual briefings to half-day and full-day live sessions in cities worldwide.
    • developerWorks podcasts
      Listen to interesting and offbeat interviews and discussions with software innovators.
    • developerWorks on Twitter
      Check out recent Twitter messages and URLs.
    • IBM Education Assistant
      A collection of multimedia educational modules that will help you better understand IBM software products and use them more effectively to meet your business requirements.

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into WebSphere on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=960298
ArticleTitle=Overlapping WebSphere MQ V7.5 clusters for high availability
publish-date=01152014