Sending XML data from an IBM MQ queue to a TCP/IP client socket

Send XML data from an IBM® MQ queue to a TCP/IP client socket, by the use of a message flow with MQInput and TCPIPClientOutput nodes.

About this task

Scenario: A server application listens on a TCP/IP socket and waits for a TCP/IP client to connect and send data. The end of the document is signalled by the client closing the connection.

Instructions: The following steps describe how to write a message flow that can take a message from an IBM MQ queue, make the client connection, and send the data to the server application:

Procedure

  1. Create a message flow called TCPIP_Task4 with an MQInput node and a TCPIPClientOutput node.
    For more information, see Creating a message flow.
  2. Connect the Out terminal of the MQInput node to the In terminal of the TCPIPClientOutput node.
    MQInput node connected to a TCPIPClientOutput node.
  3. Set the following properties of the MQInput node:
    1. On the Basic tab, set the Queue name property to TCPIP.TASK4.IN1.
    2. On the Input message parsing tab, set the Message domain property to XMLNSC.
  4. Set the following properties of the TCPIPClientOutput node:
    1. On the Basic tab, set the Connection details property to 14144.
    2. On the Advanced tab, set the Close connection property to After data has been sent.
  5. Save the message flow.