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

TCPIPClientInput node

Use the TCPIPClientInput node to create a client connection to a raw TCP/IP socket, and to receive data over that connection.

Purpose

The TCPIPClientInput node opens connections to a remote server application that is listening on a TCP/IP port. The connections are not made directly by the node but are obtained from a connection pool managed by the WebSphere® Message Broker execution group. The execution group uses the default TCPIPClient configurable service to determine which attributes are used for the socket connection. However, if the configurable service is set on the node, the configurable service is used for all the properties, including the host and port number.

You can configure the broker to use SSL for TCP/IP nodes; see SSL and the TCP/IP nodes.

When a connection is opened by the connection pool, it is sent to a TCPIPClientInput node (if the Open terminal of the node is connected). The input event is sent to only one TCPIPClientInput node on the connection.

The node requests a client connection that contains data ready for reading. Until such a connection is available, the node is paused, waiting for data (in a similar way to the MQInput node). Therefore, two criteria must be met before the node becomes available:
  • A client connection has been made
  • At least one byte of data is available to be processed

By default (as set in the configurable service), no client connections are made by the input node. The node relies on the creation of client connections by output or request nodes. In this mode of operation, an input node is never started until an output or request node starts an interaction.

You can change the mode on the configurable service to create a pool of client connections ready for processing. To use this function, minimumConnections must be set to a value larger than zero. The execution group then ensures that the specified number of connections are always available by creating them at the start, and continuing to create the connections until the minimum value is reached.

This behavior is different from the TCPIPServerInput node, which does not attempt to make a minimum number of connections. For more information, see TCPIPServerInput node.

The client node also has a maximum value, which limits how many connections it can create. More connections than the minimum value can exist as a result of output nodes creating connections.

When connections are available, the second criterion is met when there is at least one byte of data to be processed; otherwise, the connection closes. In either case, the connection is given to the node and the event is processed.

The first record of data is detected in accordance with properties on the node and then sent to the Out terminal. If an error occurs, including a timeout waiting for data or the closure of a connection while waiting for the full record, the data is sent to the Failure terminal. If the connection closes and there is no data, a message is sent to the Close terminal. Although the message has no data, the local environment does have details of the connection that closed.

For both data and close events, the following local environment is created:

Table 1. Location in local environment
Location in local environment Description
$LocalEnvironment/TCPIP/Input/ConnectionDetails/Type The client.
$LocalEnvironment/TCPIP/Input/ConnectionDetails/Hostname The host name used to make a connection.
$LocalEnvironment/TCPIP/Input/ConnectionDetails/Port The port number used to make a connection.
$LocalEnvironment/TCPIP/Input/ConnectionDetails/OpenTimestamp The time stamp when the connection was first opened.
$LocalEnvironment/TCPIP/Input/ConnectionDetails/CloseTimestamp The time stamp when the connection was closed (null if not yet closed).
$LocalEnvironment/TCPIP/Input/ConnectionDetails/SequenceNumber/InputRecord The sequence number of the message received on this connection. The first record has a sequencing number of 1; the second record has a sequencing number of 2, and so on.
$LocalEnvironment/TCPIP/Input/ConnectionDetails/SequenceNumber/OutputRecord The sequence number of the message sent on this connection. The first record has a sequencing number of 1; the second record has a sequencing number of 2, and so on.
$LocalEnvironment/TCPIP/Input/ConnectionDetails/Id The ID of the socket being used. This ID is an internal identifier used by the message broker to uniquely identify a connection.
$LocalEnvironment/TCPIP/Input/ConnectionDetails/ReplyId The reply ID that has been stored on this connection. The value can be any text string.

When the node has constructed the record from the connection stream it releases the connection back to the connection pool for use by other nodes. Properties on the Advanced tab show how that connection can be used by other nodes in the future. By default, the Advanced properties mark the input stream on the TCP/IP connection as being reserved, which means that no other input node can use it, until the current use of the message flow is finished. Alternatively, you can reserve the connection until it is unreserved by another node, or not to reserve it at all and permit any other node (or thread in this node) to use the connection straight away. Similar options are available on the output stream but it is kept unreserved by default.

Another node can access a reserved stream only if the ID of the connection is known. This behavior allows all the nodes in a message flow to access the same connection using the same ID while stopping any other flow acquiring the connection.

The TCPIPClientInput node is contained in the TCPIP drawer of the palette, and is represented in the WebSphere Message Broker Toolkit by the following icon:

TCPIPClientInput node icon

Message structure

The TCPIPClientInput node handles messages in the following message domains:
  • DFDL
  • XMLNSC
  • DataObject
  • JSON
  • BLOB
  • MIME
  • MRM
  • JMSMap
  • JMSStream
  • XMLNS

Using the TCPIPClientInput node in a message flow

Look at the following samples to see how to use the TCPIPClientInput node:

You can view information about samples only when you use the information center that is integrated with the WebSphere Message Broker Toolkit or the online information center. You can run samples only when you use the information center that is integrated with the WebSphere Message Broker Toolkit.

Configuring the TCPIPClientInput node

When you have put an instance of the TCPIPClientInput node into a message flow, you can configure it; see Configuring a message flow node. The properties of the node are displayed in the Properties view.

All mandatory properties that do not have a default value defined are marked with an asterisk.

Configure the TCPIPClientInput node:

  1. Optional: On the Description tab, enter a Short description, a Long description, or both. You can also rename the node on this tab.
  2. On the Basic tab, set the properties that determine how the TCP/IP connection is controlled.
    • Use the Connection details property to specify either the host name and port number to be used, or the name of a configurable service. This property is mandatory. The following formats are supported:
      • Configurable service name. This value is used to look up the port and host name in configurable services. For example, TCPIPProfile1.
      • <Hostname>:<Port>. This value is the host name followed by the port number (separated by a colon). For example, tcpip.server.com:1111.
      • <Port>. This value is the port number. In this case, the host name is assumed to be localhost.
    • Use the Timeout waiting for a data record (seconds) property to specify how long the node listens on a connection for more data after the first byte of data has arrived. You can specify any length of time in seconds. The default is 60 seconds. When the specified time has been exceeded, all available data is sent to the Failure terminal.
  3. On the Advanced tab, set the properties that determine how the data stream is controlled.
    • Use the Close connection property to specify when and how to close the connection.
      • Select No to leave the connection open. This value is the default.
      • Select After timeout to close the connection when a timeout occurs.
      • Select After data has been received to close the connection when the end of the record is found.
      • Select At end of flow to close the connection after the flow has been run.
    • Select Close input stream after a record has been received to close the input stream as soon as the data has been retrieved. When the connection input stream is reserved, no other node can use it without specifying the ID. This property is not selected by default.
    • Use the Input Stream Modification property to specify whether to reserve the input stream for use only by input and receive nodes that specify the connection ID, or to release the input stream at the end of the flow. These options are available only if you have not selected the Close input stream after a record has been received property.
      • Select Leave unchanged to leave the input stream as it was when it entered the node. This value is selected by default.
      • Select Reserve input stream (for use by future TCPIP input and receive nodes) to specify that this input stream can be used only by this node and by other receive nodes that request it by specifying the connection ID. When the connection input stream is reserved, no other nodes can use it without specifying the correct connection ID.
      • Select Reserve input stream (for use by future TCPIP input and receive nodes) then release at end of flow to specify that this input stream can be used only by this node and receive nodes that request it by specifying the correct connection ID. After the flow has been run, this input stream is returned to the pool and becomes available for use by any input or receive node.
    • Use the Output Stream Modification property to specify whether to release the output stream.
      • Select Leave unchanged to leave the output stream as it was when it entered the node. This value is selected by default.
      • Select Release output stream and reset ReplyID to specify that this output stream is returned to the pool and is available for use by any output node. The ReplyID is passed in the LocalEnvironment when leaving this node, but is reset for the next record on this connection.
  4. On the Input Message Parsing tab, set values for the properties that the node uses to determine how to parse the incoming message.
    If the incoming message has an MQRFH2 header, you do not have to set values for the Input Message Parsing properties because the values are derived from the <mcd> folder in the MQRFH2 header; for example:
    <mcd><Msd>MRM</Msd><Set>DHM4UO906S001</Set><Type>receiptmsg1</Type>
    <Fmt>XML</Fmt></mcd>

    If you set values that differ from those in the MQRFH2 header, the values in the MQRFH2 header take precedence.

    • In Message domain, select the name of the parser that you are using from the list. The default is BLOB. You can choose from the following options:
      • DFDL
      • XMLNSC
      • DataObject
      • JSON
      • BLOB
      • MIME
      • MRM
      • JMSMap
      • JMSStream
      • XMLNS
      You can also specify a user-defined parser, if appropriate.
    • If you are using the DFDL parser, the MRM parser or the XMLNSC parser in validating mode, select the relevant Message model from the list. This list is populated with available message sets when you select MRM or XMLNSC as the Message domain, or with available DFDL schema files when you select DFDL as the Message domain.
    • If you are using the DFDL or MRM parsers, select the correct message from the list in Message. This list is populated with messages that are defined in the Message model that you have selected.
    • If you are using the MRM parser, select the format of the message from the list in Physical format. This list includes all the physical formats that you have defined for this Message model.
    • Specify the message coded character set ID in Message coded character set ID.
    • Select the message encoding from the list in Message encoding or specify a numeric encoding value. The default is Broker System Determined. You can choose from the following options:
      • Little Endian, with IEEE Floating Point (546)
      • Big Endian, with IEEE Floating Point (273)
      • Big Endian, with S390 Floating Point (785)
      • Broker System Determined
      For more information about encoding, see Data conversion.
  5. On the Parser Options subtab:
    • Parse timing is, by default, set to On Demand, which causes parsing of the message to be delayed. To cause the message to be parsed immediately, see Parsing on demand.
    • If you are using the XMLNSC parser, set values for the properties that determine how the XMLNSC parser operates. For more information, see Manipulating messages in the XMLNSC domain.
  6. Use the Retry tab to define how retry processing is performed when a flow fails. You can set the following retry processing:
    • Retry mechanism determines the action that occurs if the flow fails. The following choices can be set:
      • Select Failure for the node to report a failure without any retry attempts.
      • Select Short retry for the node to retry before reporting a failure if the condition persists. The number of times that it retries is specified in Retry threshold.
      • Select Short retry and long retry for the node to retry, first using the value in Retry threshold as the number of attempts to make. If the condition persists after the Retry threshold has been reached, the node uses the Long retry interval between attempts.
    • Specify the Retry threshold. The number of times the node retries the flow transaction if the Retry mechanism property is set to either Short retry or Short retry and long retry.
    • Specify the Short retry interval. The length of time, in seconds, to wait between short retry attempts.
    • Specify the Long retry interval. The length of time to wait between long retry attempts until a message is successful, the message flow is stopped, or the message flow is redeployed. The broker property MinLongRetryInterval defines the minimum value that the Long retry interval can take. If the value is lower than the minimum, the broker value is used.
  7. Use the Records and Elements tab to specify how the data is interpreted as records:
    • Use the Record detection property to determine how the data is split into records, each of which generates a single message. Choose from the following options:
      • End of stream specifies that all of the data sent in the data stream is a single record.
      • Fixed Length specifies that each record is a fixed number of bytes in length. Each record must contain the number of bytes specified in the Length property, except possibly a shorter final record in the file.
      • Select Delimited if the records you are processing are separated, or terminated, by a DOS or UNIX line end or by a sequence of user-defined delimiter bytes. Specify the delimiter and delimiter type in the Delimiter and Delimiter type properties.
      • Select Parsed Record Sequence if the data contains a sequence of one or more records that are serially recognized by the parser that is specified in Message domain. The node propagates each recognized record as a separate message. If you select this Record detection option, the parser specified in Message domain must be either XMLNSC or MRM (either CWF or TDS physical format).
    • If you set Record detection to Fixed Length, use Length to specify the required length of the output record. This value must be in the range 1 byte through 100 MB. The default is 80 bytes.

      If you set Record detection to Connection closed, Fixed Length, or Delimited, a limit of 100 MB applies to the length of the records. If you set Record detection to Parsed Record Sequence, the TCPIPClientInput node does not determine or limit the length of a record. Nodes that are downstream in the message flow might try to determine the record length, or process a long record. If you intend to process large records in this way, ensure that your broker has sufficient memory. You might have to apply flow techniques described in the Large Messaging sample to best use the available memory; see Large Messaging.

      You can view information about samples only when you use the information center that is integrated with the WebSphere Message Broker Toolkit or the online information center. You can run samples only when you use the information center that is integrated with the WebSphere Message Broker Toolkit.

    • If you set Record detection to Delimited, use Delimiter to specify the delimiter to be used. Choose from:
      • DOS or UNIX Line End, which, on UNIX systems, specifies the line feed character (<LF>, X'0A'), and, on Windows systems, specifies a carriage return character followed by a line feed character (<CR><LF>, X'0D0A'). The node treats both of these strings as delimiters, irrespective of the system on which the broker is running. If they are both displayed in the same record, the node recognizes both strings as delimiters. The node does not recognize X'15', which, on z/OS® systems, is the 'newline' byte; specify a value of Custom Delimiter in this property and a value of 15 in the Custom delimiter property if your input file is coded using EBCDIC new lines, such as EBCDIC files from a z/OS system.
      • Custom Delimiter, which permits a sequence of bytes to be specified in Custom delimiter.
    • In Custom delimiter, specify the delimiter byte or bytes to be used when Custom delimiter is set in the Delimiter property. Specify this value as an even-numbered string of hexadecimal digits. The default is X'0A' and the maximum length of the string is 16 bytes (represented by 32 hexadecimal digits).
    • If you specify Delimited in Record detection, use Delimiter type to specify the type of delimiter. Permitted values are:
      • Infix. If you select this value, each delimiter separates records. If the data ends with a delimiter, the (zero length) data following the final delimiter is still propagated, although it contains no data.
      • Postfix. If you specify this value, each delimiter terminates records. If the data ends with a delimiter, no empty record is propagated after the delimiter. If the data does not end with a delimiter, it is processed as if a delimiter follows the final bytes of the data. Postfix is the default value.
    • The TCPIPClientInput node considers each occurrence of the delimiter in the input as either separating (infix) or terminating (postfix) each record. If the data begins with a delimiter, the node treats the (zero length) contents preceding that delimiter as a record and propagates an empty record to the flow. The delimiter is never included in the propagated message.
  8. Use the Validation tab to provide validation based on the message set for predefined messages. For more information about validation, see Validating messages. For information about how to complete this tab, see Validation tab properties.
  9. On the Transactions tab, set the transaction mode. Although TCP/IP operations are non-transactional, the transaction mode on this input node determines whether the rest of the nodes in the flow are to be run under point of consistency. Select Yes if you want the flow updates to be treated transactionally (if possible) or No if you do not. The default for this property is No.
  10. Optional: On the Instances tab, set values for the properties that show the additional instances (threads) that are available for a node. For more details, see Configurable message flow properties.

Terminals and properties

The terminals of the TCPIPClientInput node are described in the following table.

Terminal Description
Open The output terminal to which a message is routed when a connection is first opened. Use the Open terminal if processing is required when a connection is opened rather than when data first arrives.

The connection associated with the message is reserved from the general connection pool until propagation to the Open terminal has finished. However, the connection can be accessed using the connectionId specified in the local environment. Each connection that is created is sent to the Open terminal, including any connections that are created mid-flow by a TCPIPClientReceive node or TCPIPClientOutput node.

If the Open terminal is not attached, open events are automatically made available in the connection pool.

Failure The output terminal to which the message is routed if an error occurs. This value includes failures caused by retry processing. Even if the Validation property is set, messages propagated to this terminal are not validated.
Out The output terminal to which the message is routed if it is successfully retrieved from an external resource. If no errors occur within the input node, a message received from an external resource is always sent to the Out terminal first.
Close The output terminal to which the message is routed if the connection closes.
Catch The output terminal to which the message is routed if an exception is issued downstream and caught by this node. Exceptions are caught only if this terminal is attached.

The following tables describe the node properties. The column headed M indicates whether the property is mandatory (marked with an asterisk if you must enter a value when no default is defined); the column headed C indicates whether the property is configurable (you can change the value when you add the message flow to the BAR file for deployment).

The Description properties of the TCPIPClientInput node are described in the following table.

Property M C Default Description
Node name No No TCPIPClientInput The name of the node.
Short description No No   A brief description of the node.
Long description No No   Text that describes the purpose of the node in the message flow.

The Basic properties of the TCPIPClientInput node are described in the following table.

Property M C Default Description mqsiapplybaroverride command property
Connection details Yes Yes   A string containing either the host name and port number to be used, or the name of a configurable service. connectionDetails
Timeout waiting for a data record (seconds) Yes Yes 60 Specifies how long the node listens on a connection for more data after the first byte of data has arrived. You can specify any length of time in seconds. timeoutWaitingForData

The Advanced properties of the TCPIPClientInput node are described in the following table.

Property M C Default Description
Close connection Yes No No Controls when the connection is closed, or if it remains open. Valid options are:
  • No
  • After Timeout
  • After Data has been Received
  • At End of Flow
Close input stream after a record has been received Yes No Cleared Specifies whether to close the input stream as soon as the data has been retrieved. When the connection input stream is reserved, no other node can use it without knowing the ID. This property is not selected by default.
Input Stream Modification No No Leave unchanged Specifies whether to reserve the input stream for use only by input and receive nodes that specify the connection ID, or to release it at the end of the flow. Valid options are:
  • Leave unchanged
  • Reserve input stream (for use by future TCPIP nodes)
  • Reserve input stream (for use by future TCPIP nodes) then release at end of flow
When the connection input stream is reserved, no other nodes can use it without specifying the correct connection ID. If the input stream is released at the end of the flow, it is returned to the pool and becomes available for use by any input or receive node.
Output Stream Modification No No Leave unchanged Specifies whether this output stream is released and returned to the pool for use by any output node. Valid options are:
  • Leave unchanged
  • Release output stream and reset ReplyID
If you select Release output stream and reset ReplyID, the ReplyID is passed in the LocalEnvironment when leaving this node, but is reset for the next record on this connection.

The TCPIPClientInput node Input Message Parsing properties are described in the following table.

Property M C Default Description mqsiapplybaroverride command property
Message domain No No BLOB The domain that is used to parse the incoming message.  
Message model No No   The name or location of the message model in which the incoming message is defined.  
Message No No   The name or location of a global element that models an entire document of data, and is contained in your message model schema file. This list is populated with all available messages that are defined in the Message model that you have selected.  
Physical Format No No   The name of the physical format of the incoming message.  
Message coded character set ID Yes No Broker System Default The ID of the coded character set used to interpret the data being read. messageCodedCharSetIdProperty
Message encoding Yes No Broker System Determined The encoding scheme for numbers and large characters used to interpret the data being read. Valid values are Broker System Determined or a numeric encoding value. For more information about encoding, see Data conversion. messageEncodingProperty

The Parser Options properties of the TCPIPClientInput node are described in the following table.

Property M C Default Description
Parse timing No No On Demand This property controls when an input message is parsed. Valid values are:
  • On Demand
  • Immediate
  • Complete

For a full description of this property, see Parsing on demand.

Build tree using XML schema data types No No Cleared This property controls whether the syntax elements in the message tree have data types taken from the XML schema.
Use XMLNSC compact parser for XMLNS domain No No Cleared This property controls whether the XMLNSC Compact Parser is used for messages in the XMLNS Domain. If you set this property, the message data is displayed under XMLNSC in nodes that are connected to the output terminal when the input MQRFH2 header or Input Message Parsing property, Message Domain, is XMLNS.
Retain mixed content No No Cleared This property controls whether the XMLNSC parser creates elements in the message tree when it encounters mixed text in an input message. If you select the check box, elements are created for mixed text. If you clear the check box, mixed text is ignored and no elements are created.
Retain comments No No Cleared This property controls whether the XMLNSC parser creates elements in the message tree when it encounters comments in an input message. If you select the check box, elements are created for comments. If you clear the check box, comments are ignored and no elements are created.
Retain processing instructions No No Cleared This property controls whether the XMLNSC parser creates elements in the message tree when it encounters processing instructions in an input message. If you select the check box, elements are created for processing instructions. If you clear the check box, processing instructions are ignored and no elements are created.
Opaque elements No No Blank This property is used to specify a list of elements in the input message that are to be opaquely parsed by the XMLNSC parser.

The Records and Elements properties of the TCPIPClientInput node are described in the following table:

Property M C Default Description
Record detection Yes No End of Stream The mechanism used to identify records in the input data. Valid options are:
  • End of Stream
  • Fixed Length
  • Delimited
  • Parsed Record Sequence
Length (bytes) Yes No 0 The length of each record, in bytes, when Fixed Length record detection is selected.
Delimiter Yes No DOS or UNIX Line End The type of delimiter bytes that separate, or end, each record when Delimited record detection is selected. Valid options are:
  • DOS or UNIX Line End
  • Custom Delimiter (Hexadecimal)
Custom delimiter (hexadecimal) No No   The delimiter bytes, expressed in hexadecimal, when Delimited record detection and Custom Delimiter are selected. This property is mandatory only if the Delimiter property is set to Custom Delimiter (Hexadecimal).
Delimiter type Yes No Postfix The location of the delimiter when Delimited record detection and Custom Delimiter (Hexadecimal) are selected. Valid options are:
  • Infix
  • Postfix
This property is ignored unless the Delimiter property is set to Custom Delimiter (Hexadecimal).

The Retry properties of the TCPIPClientInput node are described in the following table:

Property M C Default Description mqsiapplybaroverride command property
Retry mechanism Yes No Failure How the node handles a flow failure. Valid options are:
  • Failure
  • Short Retry
  • Short and Long Retry
 
Retry threshold Yes Yes 0 The number of times to retry the flow transaction when Retry mechanism is Short retry. retryThreshold
Short retry interval No Yes 0 The interval, in seconds, between each retry if Retry threshold is not zero. shortRetryInterval
Long retry interval No Yes 300 The interval between retries if Retry mechanism is Short and long retry and the retry threshold has been exhausted. longRetryInterval

The Validation properties of the TCPIPClientInput node are described in the following table.

For a full description of these properties, see Validation properties.

Property M C Default Description mqsiapplybaroverride command property
Validate No Yes None This property controls whether validation takes place. Valid values are
  • None
  • Content and Value
  • Content
validateMaster
Failure action No No Exception This property controls what happens if validation fails. Valid values are:
  • User Trace
  • Local Error Log
  • Exception
  • Exception List
 

The Transactions properties of the TCPIPClientInput node are described in the following table:

Property M C Default Description
Transaction mode No Yes No The transaction mode on this input node determines whether the rest of the nodes in the flow are run under point of consistency. Valid options are:
  • No
  • Yes
The Instances properties of the TCPIPClientInput node are described in the following table. For a full description of these properties, see Configurable message flow properties.
Property M C Default Description mqsiapplybaroverride command property
Additional instances pool No Yes Use Pool Associated with Message Flow The pool from which additional instances are obtained.
  • If you select Use Pool Associated with Message Flow, additional instances are obtained from the message flow pool.
  • If you select Use Pool Associated with Node, additional instances are allocated from the additional instances of the node based on the number specified in the Additional instances property.
componentLevel
Additional instances No Yes 0 The number of additional instances that the node can start if the Additional instances pool property is set to Use Pool Associated with Node. additionalInstances
The Monitoring properties of the node are described in the following table.
Property M C Default Description
Events No No None Events that you have defined for the node are displayed on this tab. By default, no monitoring events are defined on any node in a message flow. Use Add, Edit, and Delete to create, change or delete monitoring events for the node; see Configuring monitoring event sources using monitoring properties for details.

You can enable and disable events that are shown here by selecting or clearing the Enabled check box.

Notices | Trademarks | Downloads | Library | Support | Feedback

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

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


Reference topicReference topic | Version 8.0.0.7 | ac67300_