See information about the latest product version
TCPIPClientReceive node
Use the TCPIPClientReceive node to receive data over a client TCP/IP connection.
This topic contains the following sections:
Purpose
The TCPIPClientReceive node waits for data to be received on a TCP/IP connection, and retrieves the data. If the connection is closed, an exception is thrown.
You can configure the broker to use SSL for TCP/IP nodes; see SSL and the TCP/IP nodes.
When a connection is established, the data is sent to the TCPIPClientReceive node. If the TCPIPClientReceive node fails to receive all of the data within the time specified in the Timeout waiting for a data record property, the message is sent to the timeout terminal; if no timeout terminal is connected, an exception is thrown.
Properties in the local environment can override the TCP/IP connection used by the node.
Location in local environment for input to node | Description |
---|---|
$LocalEnvironment//TCPIP/Receive/Hostname | The host name used to make a connection. |
$LocalEnvironment//TCPIP/Receive/Port | The port number used to make a connection. |
$LocalEnvironment/TCPIP/Receive/Id | The ID of the socket being used. This ID is an internal identifier used by WebSphere® Message Broker to uniquely identify a connection. |
$LocalEnvironment/TCPIP/Receive/ReplyId | The Reply ID to be stored on this connection. This ID can then be used when data is returned on an input node. The Reply ID can be any text string. |
$LocalEnvironment/TCPIP/Receive/Timeout | The timeout value used when waiting for data on the TCP/IP client connection. This value overrides the Timeout waiting for a data record property specified on the node. |
$LocalEnvironment/TCPIP/Receive/Length | The value used to override the number of bytes to be read when using fixed size records. This value overrides the Length (bytes) property specified on the node. If the Record detection property is set to anything other than Fixed Length, the local environment field is ignored. If this field is not present or evaluates to null, it is ignored and the value on the node is used. |
These properties enable the connection details (host name and port number) and the connection used (ID) to be selected dynamically. You can also set the Reply ID on the connection, which enables a string to be stored in the connection and to be seen in the local environment of any data that is received back from this connection. You can use this connection to store Reply IDs from other TCPIP nodes or from other transports, such as WebSphere MQ.
When a record has been retrieved, the ConnectionDetails field in the local environment is populated with the details of the connection that is being used.
Location in local environment for output from node | Description |
---|---|
$LocalEnvironment/TCPIP/Receive/ConnectionDetails/Type | The client. |
$LocalEnvironment/TCPIP/Receive/ConnectionDetails/Hostname | The host name used to make a connection. |
$LocalEnvironment/TCPIP/Receive/ConnectionDetails/Port | The port number used to make a connection. |
$LocalEnvironment/TCPIP/Receive/ConnectionDetails/OpenTimestamp | The time stamp when the connection was first opened. |
$LocalEnvironment/TCPIP/Receive/ConnectionDetails/CloseTimestamp | The time stamp when the connection was closed (null if not yet closed). |
$LocalEnvironment/TCPIP/Receive/ConnectionDetails/SequenceNumber/InputRecord | The sequence number of the message that is received on this connection. The first record has a sequencing number of 1; the second record is 2; and so on. |
$LocalEnvironment/TCPIP/Receive/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 is 2; and so on. |
$LocalEnvironment/TCPIP/Receive/ConnectionDetails/Id | The ID of the socket being used. This ID is an internal identifier used by WebSphere Message Broker to uniquely identify a connection. |
$LocalEnvironment/TCPIP/Receive/ConnectionDetails/ReplyId | The Reply ID that is stored on this connection. This ID can be any text string. |
The TCPIPClientReceive node is contained in the TCPIP drawer of the palette, and is represented in the WebSphere Message Broker Toolkit by the following icon:

Message structure
- DFDL
- XMLNSC
- DataObject
- JSON
- BLOB
- MIME
- MRM
- JMSMap
- JMSStream
- XMLNS
Using the TCPIPClientReceive node in a message flow
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 TCPIPClientReceive node
When you have put an instance of the TCPIPClientReceive 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 TCPIPClientReceive node:
- Optional: On the Description tab, enter a Short description, a Long description, or both. You can also rename the node on this tab.
- 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.
- 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:
- 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 Close input stream after a record has been received to close the input stream as soon as the data has been retrieved. By default this property is not selected. When the connection input stream is reserved, no other node can use it without knowing the ID.
- 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.
- Select Leave unchanged to leave the input stream as it was when it entered the node. This value is selected by default.
- Select Release input stream to specify that this input stream is returned to the pool and is available for use by any input or receive node.
- 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 input or 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 after propagate 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 message has been propagated, 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 reserve or release the output stream. These
options are available only if you have not selected the Close output stream after a record has
been sent property.
- 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 to specify that this output stream is returned to the pool and is available for use by any output node.
- Select Reserve output stream (for use by future TCPIP output nodes) to specify that this output stream can be used only by this node and by other output 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 output stream (for use by future TCPIP output nodes) then release after propagate to specify that this output stream can be used only by this node and output nodes that request it by specifying the correct connection ID. After the message has been propagated, this output stream is returned to the pool and becomes available for use by any output node.
- Use the Close connection property
to specify when and how to close the connection.
- On the Request tab, specify
the location of the data to be written. You can specify the properties
on this tab as XPath or ESQL expressions. Content Assist is available
in the Properties view and also in the XPath Expression Builder, which
you can run by clicking Edit to the right of
each property.
- In Hostname location, specify the location of the value to override the Hostname that is set in the Connection details property of the Basic tab. If you do not specify a location, the default value is $LocalEnvironment/TCPIP/Receive/Hostname.
- In Port location, specify the location of the value to override the Port that is set in the Connection details property of the Basic tab. If you do not specify a location, the default value is $LocalEnvironment/TCPIP/Receive/Port.
- In ID location, specify the location of the Id of the socket being used. This internal identifier is used by WebSphere Message Broker to uniquely identify a connection. If you do not specify a location, the default value is $LocalEnvironment/TCPIP/Receive/Id.
- In Reply ID location, specify the location of the Reply ID that is stored on the connection that is being used. The Reply ID can be used when data is returned in an input node. If you do not specify a location, the default value is $LocalEnvironment/TCPIP/Receive/ReplyId.
- On the Result tab, set values for the properties
that determine where the reply is stored.
- Use the Output data location property to specify the start location in the output message tree where the parsed elements from the bit string of the message are stored. The default value is $OutputRoot.
- Use the Copy local environment property
to specify whether the local environment is copied to the output message.
- If Copy local environment is selected, a new copy of the local environment is created in the tree, and it is populated with the contents of the local environment from the preceding node. Therefore, if a node changes the local environment, the upstream nodes are not affected by those changes because they have their own copies. This value is the default.
- If Copy local environment is not selected, the node does not generate its own copy of the local environment, but uses the local environment that is passed to it by the preceding node. Therefore, if a node changes the local environment, the changes are reflected by the upstream nodes.
- 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, and if they differ from the values 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
- 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. For more information about encoding, see Data conversion.
- 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:
- 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.
- Use the Records and Elements tab
to specify how the data is interpreted as records. Only one record
is retrieved each time the TCPIPClientReceive node is
invoked; therefore, if the TCP/IP stream contains multiple logical
messages, you must call the node multiple times to receive all the
messages.
- 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:
- Connection closed specifies that all of the data sent during a connection is a single record.
- Fixed Length specifies that each record is a fixed number of bytes in length. Each record contains the number of bytes specified in the Length property, except possibly a shorter final record in the file.
- Select Delimited if the records that 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 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 TCPIPClientReceive 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.
- If you set Record detection to Delimited, use Delimiter to specify the delimiter
to be used. Choose from the following options:
- DOS or UNIX Line End, 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 both strings can be seen in the same record, the node recognizes both as delimiters. The node does not recognize X'15' which, on z/OS® systems, is the 'newline' byte; set this property to Custom Delimiter and set Custom delimiter to 15 if your input file is coded using EBCDIC new lines.
- Custom Delimiter (hexadecimal), permits a sequence of bytes to be specified in Custom delimiter (hexadecimal)
- In Custom delimiter (hexadecimal), specify the delimiter byte or bytes to be used when Delimiter is set to Custom delimiter (hexadecimal). 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 set Record detection to Delimited, 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 TCPIPClientReceive 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.
- 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:
- 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.
Terminals and properties
The terminals of the TCPIPClientReceive node are described in the following table.
Terminal | Description |
---|---|
In | The input terminal that accepts a message for processing by the node. |
Out | The output terminal to which the message is routed if it is successfully retrieved from an external resource. If no errors occur in the input node, a message received from an external resource is always sent to the Out terminal first. |
Timeout | The terminal to which a message is sent when the time specified in the Timeout waiting for a data record property has been exceeded. The message text is timeout value is exceeded. |
Failure | The output terminal to which the message is routed if an error occurs. These errors include failures caused by retry processing. Even if the Validation property is set, messages propagated to this terminal are not validated. |
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 to deploy it).
The Description properties of the TCPIPClientReceive node are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Node name | No | No | TCPIPClientReceive | 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 TCPIPClientReceive 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 TCPIPClientReceive 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:
|
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. By default, this property is not selected. |
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 the input stream at the end of the flow. Valid options
are:
|
Output Stream Modification | No | No | Leave unchanged | Specifies whether to reserve this output stream
or release it and return it to the pool for use by any output node.
Valid options are:
|
The Request properties of the TCPIPClientReceive node are described in the following table:
Property | M | C | Default | Description |
---|---|---|---|---|
Host name location | Yes | No | $LocalEnvironment/TCPIP/Receive/Hostname | The message element location that contains the host name. |
Port location | Yes | No | $LocalEnvironment/TCPIP/Receive/Port | The message element location that contains the port. |
ID location | Yes | No | $LocalEnvironment//TCPIP/Receive/Id | The message element location that contains the ID. |
Reply ID location | Yes | No | $LocalEnvironment/TCPIP/Receive/ReplyId | The message element location that contains the Reply ID. |
Record length location | No | No | $LocalEnvironment/TCPIP/Receive/Length | The message element location that contains the record length to be read. Specify the location of the value to override the Length (bytes) property on the Records and elements tab. If you do not specify a location, the default value is $LocalEnvironment/TCPIP/Receive/Length. |
The Result properties of the TCPIPClientReceive node are described in the following table:
Property | M | C | Default | Description |
---|---|---|---|---|
Output data location | No | No | $OutputRoot | The start location in the output message tree where the parsed elements from the bit string of the message are stored. |
Copy local environment | No | No | Selected | Specifies if the local environment is copied to the output message. |
The Input Message Parsing properties of the TCPIPClientReceive node 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 TCPIPClientReceive 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:
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 datais 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 parsed opaquely by the XMLNSC parser. |
The Records and Elements properties of the TCPIPClientReceive node are described in the following table:
Property | M | C | Default | Description |
---|---|---|---|---|
Record detection | Yes | No | Connection Closed | The mechanism used to identify records in the
input data. Valid options are:
|
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
ends, each record when Delimited record
detection is selected. Valid options are:
|
Custom delimiter (hexadecimal) | No | No | The delimiter bytes, expressed in hexadecimal, when Delimited record detection and Custom Delimiter (Hexadecimal) 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:
|
The Validation properties of the TCPIPClientReceive 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
|
validateMaster |
Failure action | No | No | Exception | This property controls what happens if validation
fails. You can set this property only if you set Validate to Content or Content and Value. Valid values
are:
|
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. |