Connecting components

Before you start:

To complete this task, you must have completed the following tasks:

Complete the steps below to make connections between the Configuration Manager, brokers, and the User Name Server.

If components in your broker domain are supported by different queue managers, establish WebSphere MQ connections between those queue managers to enable messages to be exchanged. It is important that each broker is able to exchange messages with the User Name Server that provides user name services for the broker.

If your broker domain components all run on the same system, and use a single queue manager, you do not need to create any WebSphere MQ connections between your brokers.

To achieve the required connection, complete the following steps. All the steps here are illustrated with MQSC examples. You can use any appropriate method for defining these resources. These examples assume that the queue managers are called COMP1 and COMP2.

The value of 104857600 for maxmsgl in the following steps is merely an example. You are recommended to check the appropriate WebSphere MQ documentation to confirm the value for maxmsgl that you can use on your particular platforms.

In addition, note that you have to set the maxmsgl attribute only on the transmission queue that sends messages from the Configuration Manager's queue manager to the broker's queue manager.

  1. Define a transmission queue on each component's queue manager. These queues will collect messages ready for transmission between components. Give the transmission queue the same name as the queue manager to which it transmits messages (that is COMP1 and COMP2 for this example). In addition, set the maxmsgl attribute to its maximum value.
    For example, on queue manager COMP1:
    define qlocal('COMP2') usage(XMITQ) maxmsgl (104857600) replace
    and on queue manager COMP2:
    define qlocal('COMP1') usage(XMITQ) replace
  2. Define the channels for the connection. Use sender-receiver pairs of channels for all two-way communications between queue managers that host WebSphere Event Broker components.
    1. Define the sender channel on the first component's queue manager (Sender(3)). This will transport messages sent by the first component to the second component.

      Allocate connection names according to your WebSphere MQ network conventions, and specify the protocol that you are using for this connection and the port on which the listener is listening.

      For example, on queue manager COMP1:

      define channel('COMP1_TO_COMP2') chltype(sdr) trptype(tcp)
      conname('WBRKSYS1(1415)') xmitq('COMP2') 
      maxmsgl (104857600) replace
    2. Define a receiver channel on the first component's queue manager (Receiver(2)). Messages sent by the second component to the first will be received by this channel.
      This receiver channel must have the same name as the sender channel on COMP2, defined in Step 2c. For example, on queue manager COMP1:
      define channel('COMP2_TO_COMP1') chltype(rcvr) trptype(tcp)
      maxmsgl (104857600) replace
    3. Define the sender channel on the second component's queue manager (Sender(1)). This will transport messages sent by the second component to the first component.

      Allocate connection names according to your WebSphere MQ network conventions, and you must specify the protocol you are using for this connection.

      For example, on queue manager COMP2:

      define channel('COMP2_TO_COMP1') chltype(sdr) trptype(tcp)
      conname('WBRKSYS1(1414)') xmitq('COMP1')
      maxmsgl (104857600) replace
    4. Define a receiver channel on the second component's queue manager (Receiver(4)). Messages sent by the first component to the second will be received by this channel.

      This receiver channel must have the same name as the sender channel on COMP2, defined in Step 2a. For example, on queue manager COMP2:

      define channel('COMP1_TO_COMP2') chltype(rcvr) trptype(tcp)
      maxmsgl (104857600) replace
  3. Create and start a listener for each protocol in use.
  4. Start the sender channels (1) and (3) on the respective queue managers. You can set up channel initiators for these channels. This reduces overhead by allowing the channels to stop when there is no message traffic, but ensures automatic startup when there are messages to transport.

You can set up a single receiver channel on the Configuration Manager's queue manager to support all sender channels created for the brokers. This requires a single definition on the Configuration Manager and a single sender definition on each broker, which must have the same name on each broker. You can also use this receiver channel on the Configuration Manager to support communications from the User Name Server.

All WebSphere MQ connections between WebSphere Event Broker components, and between clients and WebSphere Event Broker components, can be set up using any of the communications protocols supported by WebSphere MQ (TCP/IP and SNA on all operating systems; also, NetBIOS and SPX on Windows).

Related concepts
Brokers
Configuration Manager
User Name Server
Related tasks
Creating a Configuration Manager
Creating a broker
Creating a User Name Server
Connecting the User Name Server to the WebSphere Event Broker network
Enabling applications to use Publish/Subscribe