Friday, 29 January 2016

WebSphere MQ Cluster Setup

This demo considers creating a cluster environment with four queue managers in which two of them act as full repositories (QM_FR1,QM_FR2) and other two act as partial repositories (QM_PR1,QM_PR2). The full repositories will communicate with each other and the partial repositories will communicate with any of the full repositories using the defined cluster sender receiver channels.

       

  1. Create a queue manger QM_FR1, listener, full repository by using the following commands
    1. CRTMQM QM_FR1<--to create a queue manager
    2. STRMQM QM_FR1<--to start a queue manage
    3. RUNMQSC QM_FR1<-- to perform some administrative tasks
      1. ALTER QMGR REPOS('CLUSTER1')<--To create a cluster and make the queue manager as full repositories
      2. DEFINE LISTENER(L1) TRPTYPE(TCP) CONTROL(QMGR) PORT(1450)<--to create a listener in the QM_FR1
      3. START LISTENER(L1)<-- to start listener
  2. Create a queue manger QM_FR2, listener,cluster sender and cluster receiver channels and make them as full repository by using the following commands
    1. CRTMQM QM_FR2<--to create a queue manager
    2. STRMQM QM_FR2<--to start a queue manager
    3. RUNMQSC QM_FR2<-- to perform some administrative tasks
      1. ALTER QMGR REPOS('CLUSTER1')<--To create a cluster and make the queue manager as full repositories
      2. DEFINE LISTENER(L2) TRPTYPE(TCP) CONTROL(QMGR) PORT(1451)<--to create a listener in the QM_FR1
      3. START LISTENER(L2)<-- to start listener
  3. Define the cluster receiver channels for the queue managers QM_FR1 and QM_FR2
    1. DEFINE CHANNEL(TO.QM_FR1) CHLTYPE(CLUSRCVR) CONNAME('LOCALHOST(1450)') CLUSTER('CLUSTER1')<-----to create the cluster receiver channel in QM_FR1
    2. DEFINE CHANNEL(TO.QM_FR2) CHLTYPE(CLUSSDR) CONNAME('LOCALHOST(1451)') CLUSTER('CLUSTER1')<------to create the cluster sender channel in QM_FR1
  4. Define the cluster sender channel on the queue managers. The channel name must match that of the cluster sender channel on the full repository
    1. DEFINE CHANNEL(TO.QM_FR2) CHLTYPE(CLUSRCVR) CONNAME('LOCALHOST(1451)') CLUSTER('CLUSTER1')<----to create the cluster receiver channel in QM_FR2
    2. DEFINE CHANNEL(TO.QM_FR1) CHLTYPE(CLUSSDR) CONNAME('LOCALHOST(1450)') CLUSTER('CLUSTER1')<------to create the cluster sender channel in QM_FR2
  5. Create the queue manager QM_PR1, listener and make it as a partial repository by creating cluster sender and cluster receiver channels to full repository
    1. CRTMQM QM_PR1<------to create the queue manager
    2. RUNMQSC QM_PR1<-- to perform some administrative tasks
      1. DEFINE LISTENER(PRL1) TRPTYPE(TCP) CONTROL(QMGR) PORT(1452)<----to create the listener
      2. START LISTENER(PRL1)<------to start the listener
      3. DEFINE CHANNEL(TO.QM_PR1) CHLTYPE(CLUSRCVR) CONNAME('LOCALHOST(1452)') CLUSTER('CLUSTER1')<-------to create the cluster receiver channel in QM_PR1(partial repository)
      4. DEFINE CHANNEL(TO.QM_FR1) CHLTYPE(CLUSSDR) CONNAME('LOCALHOST(1450)') CLUSTER('CLUSTER1')<-------to create the cluster sender channel in QM_PR1(partial repository)
  6. Create the queue manager QM_PR2, listener and make it as a partial repository by creating cluster sender and cluster receiver channels to full repository
    1. CRTMQM QM_PR2<------to create the queue manager
    2. RUNMQSC QM_PR2<-- to perform some administrative tasks
      1. DEFINE LISTENER(PRL2) TRPTYPE(TCP) CONTROL(QMGR) PORT(1453)<----to create the listener
      2. START LISTENER(PRL2)<------to start the listener
      3. DEFINE CHANNEL(TO.QM_PR2) CHLTYPE(CLUSRCVR) CONNAME('LOCALHOST(1453)') CLUSTER('CLUSTER1')<-------to create the cluster receiver channel in QM_PR2(partial repository)
      4. DEFINE CHANNEL(TO.QM_FR2) CHLTYPE(CLUSSDR) CONNAME('LOCALHOST(1451)') CLUSTER('CLUSTER1')<-------to create the cluster sender channel in QM_PR1(partial repository)
  7. Create clustered queue in the QM_PR1 which is made available to other queue managers in the cluster
    1. RUNMQSC QM_PR1 <--to perform some administrative tasks
    2. DEFINE QLOCAL(CQ1) CLUSTER('CLUSTER1')
  8. Put a test message into the cluster queue CQ1 from other queue manager QM_FR1 using the command "AMQSPUT" as
    1. AMQSPUT CQ1 QM_FR1



No comments :

Post a Comment