WebSphere Message Broker, Version 8.0.0.7 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Configuring a client node to dynamically call a port

Configure a client node to dynamically use a port and hostname that are set in the local environment, by the use of a message flow with MQInput, Compute, and TCPIPClientOutput nodes.

Scenario: A client node dynamically calls a port.

Instructions: The following steps show how to override the connection details specified on a client output node to dynamically use a port and hostname that are set in the local environment:

  1. Create a message flow called TCPIP_Task16 with an MQInput node, a Compute 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 Compute node.
  3. Connect the Out terminal of the Compute node to the In terminal of the TCPIPClientOutput node.
    Message flow consisting of MQInput, Compute, and TCPIPClientOutput nodes.
  4. On the MQInput node, set the Queue name property (on the Basic tab) to TCPIP.TASK16.IN1 .
  5. On the Compute node, set the ESQL property (on the Basic tab) to:
    BROKER SCHEMA Tasks
    CREATE COMPUTE MODULE TCPIP_Task16_Compute
    	CREATE FUNCTION Main() RETURNS BOOLEAN
    	BEGIN
    		-- CALL CopyMessageHeaders();
    		CALL CopyEntireMessage();
    		set InputLocalEnvironment.Destination.TCPIP.Output.Hostname = 'localhost';
    		set InputLocalEnvironment.Destination.TCPIP.Output.Port = 14156;
    		RETURN TRUE;
    	END;
    
    	CREATE PROCEDURE CopyMessageHeaders() BEGIN
    		DECLARE I INTEGER 1;
    		DECLARE J INTEGER;
    		SET J = CARDINALITY(InputRoot.*[]);
    		WHILE I < J DO
    			SET OutputRoot.*[I] = InputRoot.*[I];
    			SET I = I + 1;
    		END WHILE;
    	END;
    
    	CREATE PROCEDURE CopyEntireMessage() BEGIN
    		SET OutputRoot = InputRoot;
    	END;
    END MODULE;
  6. On the TCPIPClientOutput node, set the Connection details property (on the Basic tab) to 9999.
  7. Save the message flow.
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2016Copyright IBM Corporation 1999, 2016.

        
        Last updated:
        
        Last updated: 2016-05-23 14:46:32


Task topicTask topic | Version 8.0.0.7 | ac67560_