Running the IBM MQ Bridge to blockchain

Run the IBM MQ Bridge to blockchain to connect to IBM Blockchain and IBM MQ. When connected, the bridge is ready to process request messages, send them to your Hyperledger Composer blockchain network, and receive and process the replies.


Use the configuration file that you created in the previous task, to run the IBM MQ Bridge to blockchain.


Procedure

  1. Start the IBM MQ Advanced for z/OS VUE queue manager that we want to use with the bridge.
  2. Start the IBM MQ Bridge to blockchain to connect to your blockchain network, and the IBM MQ Advanced for z/OS VUE queue manager. Either:
    1. Run the bridge directly in UNIX System Services (USS) from the mqbc/bin directory in the USS location where IBM MQ is installed.
      ./runmqbcb -f /config_file_location/config_file_name.cfg -r /log_file_location/logFile.log
      
      or
    2. b. Run the bridge on your z/OS system, using the sample JCL provided in thlqual.SCSQPROC(CSQ4BCB). We must make a number of updates to the JCL, specific to the environment:

      • Replace ++THLQUAL++ with the high level qualifier of the IBM MQ target library data sets.
      • Replace ++LANGLETTER++ with the letter for the language that we want messages shown in.
      • Replace ++PATHPREFIX++ with the IBM MQ for z/OS USS Components installation path.
      • Replace ++CONFIGFILE++ with the path to a configuration file created by using the runmqbc -o <file> command from USS.
      • Replace ++JAVAHOME++ with the location of a 64 bit Java Virtual Machine (JVM) running at Java Version 8 or later.

    When the bridge is connected, output similar to the following is returned:

    2018-05-17 14:28:16.866 BST IBM MQ Bridge to Blockchain
    5724-H72 (C) Copyright IBM Corp. 2017, 2020
    
    2018-05-17 14:28:19.331 BST Ready to process input messages.
    
  3. Optional: Troubleshoot connections to the IBM MQ Advanced for z/OS VUE queue manager and to your blockchain network, if the messages that are returned after you run the bridge indicate that a connection was not successful.
    1. Issue the command in debug mode with the debug option 1.
      ./runmqbcb -f /config_file_location/config_file_name.cfg -r /log_file_location/logFile.log -d 1
      The bridge steps through the connection set up and shows the processing messages in terse mode.
    2. Issue the command in debug mode with the debug option 2.
      ./runmqbcb -f /config_file_location/config_file_name.cfg -r /log_file_location/logFile.log -d 2
      The bridge steps through the connection set up and shows the processing messages in verbose mode. Full output is written to your log file.

    Note that, optionally, we can also specify the debug mode options within the JCL by changing '-d 0' to '-d 1' or '-d 2'.


Results

We have started the IBM MQ Bridge to blockchain and connected to your queue manager and blockchain network.


What to do next

  • Message formats for the IBM MQ Bridge to blockchain
    Information on formatting of the messages that are sent and received by the IBM MQ Bridge to blockchain.
  • Running the IBM MQ Bridge to blockchain client sample
    We can use the JMS client sample that is provided with the IBM MQ Bridge to blockchain, to put a message on the input queue that the blockchain bridge is checking and see the reply that is received. This sample is based on using the IBM MQ Bridge to blockchain integrating with the Hyperledger Composer Trader network example.

Parent topic: Configure IBM MQ Advanced for z/OS VUE for use with blockchain