Preparing the environment to split processing between different integration servers

When you split message flow processing between different integration servers, you must configure a data router and a connectivity agent. The integration servers can be running on different integration nodes.

Before you begin

Read the concept information in Callable message flows.

About this task

When you split processing between different integration servers, your flows communicate by using a Switch server and connectivity agents. The Switch server is a special kind of integration server that routes data. The connectivity agents contain the certificates that your flows require to communicate securely with the Switch server. A connectivity agent must be running in each integration server where you have deployed message flows. The integration servers can be in the same integration node or in different integration nodes, as shown in the following example.
The diagram shows two applications in two different integration servers. Each integration server is in a separate integration node.  The CallableFlowInvoke node in a flow in application 1 uses a Switch server to call the CallableInput node of a flow in application 2.
If you are splitting processing between IBM Integration Bus and IBM App Connect on IBM Cloud, the Switch server is created and managed for you in the cloud. If your callable flows are all deployed on premises, you must create and configure the Switch server. You must run a command that creates some configuration files. You use one of the configuration files to create the Switch server, and the other file to configure connectivity agents for each integration server where you have deployed callable flows.

This scenario is supported on Windows and Linux® only.

Procedure

To prepare the environment to split processing between integration servers, complete the following steps.

  1. Start an IBM Integration Bus command environment.
  2. Run the iibcreateswitchcfg command to create the required configuration files.
    You need to run the command in a directory for which you have permission to write. Alternatively, you can specify an output directory. For example, the following command creates the configuration files and saves them in the temp directory.
    Windows platformOn Windows:
    iibcreateswitchcfg /output c:\temp
    Linux platformOn Linux:
    iibcreateswitchcfg -output /temp
    If this command is successful, you see the following responses:
    Generated self signed certificate file 'c:\temp\adminClient.p12'
    Generated switch configuration file 'c:\temp\switch.json'
    Generated agentx configuration file 'c:\temp\agentx.json'
    This command creates two JSON configuration files, and a certificate, which is reserved for future use. One file (switch.json) is used to create the Switch server. The other file (agentx.json) is used by the mqsichangeproperties command to configure secure connectivity for the integration servers where your flows are deployed.
  3. Run the iibswitch command to create the Switch server by using the configuration file (switch.json) that you created in step 2.
    Windows platformFor example, on Windows:
    iibswitch create switch /config c:\temp\switch.json
    Linux platformOn Linux:
    iibswitch create switch -c /temp/switch.json
    If the command is successful, you see the following response:
    iibswitch created and started
    The Switch server is created in a special integration node called IIBSWITCH_NODE.
  4. Optional: To test that the Switch server is created and running, run the command mqsilist IIBSWITCH_NODE.
    If the Switch server is running, you see the following response:
    BIP1286I: Integration server 'IIBSWITCH_SERVER' on integration node 'IIBSWITCH_NODE' is running.
  5. Run the mqsichangeproperties command for each integration server where you have deployed message flows.
    For example, the following command uses the integration server configuration file (agentx.json) that you created in step 2.
    mqsichangeproperties integrationNodeName -e integrationServerName -o ComIbmIIBSwitchManager -n agentXConfigFile -p filepath\agentx.json
    This command ensures that the integration servers have the correct certificates to communicate securely with the Switch server.
  6. Restart the integration nodes that contain the affected integration servers.
  7. Verify that your nodes have connected to the switch, by running the mqsireportproperties command as described in Determine the status of the switch server for callable flows.

Results

A message flow that is deployed to one configured integration server can now communicate securely with a message flow on the other configured integration server. For more information about developing these message flows, see Developing synchronously callable message flows.