NextGen Knowledge Center

TCP Sender

This destination connector opens a new TCP client connection and sends messages over it. You can decide whether to keep a connection open, and if so for how long. Configurable transmission modes allow you to decide how to send outbound messages and receive responses.

Supported property groups:

ItemNameDefault ValueDescription
ATransmission ModeMLLPThe transmission mode determines how to send message data out on the socket byte stream, and how to receive responses. For additional information, see TCP Listener
BSample Frame<VT> <Message Data> <FS><CR>This is dependent on the Transmission Mode and displays an example of how an outgoing message frame is expected to look.
CModeClient
  • Client: The TCP Sender will initiate new connections outbound to a remote server, and then send messages outbound on that connection.
  • Server: The TCP Sender will open a server socket and listen for incoming connections. If queuing is enabled, messages will continue to queue until at least one connection has been established, at which point the messages will be sent to all currently connected client connections.
DRemote Address127.0.0.1

The domain name or IP address on which to connect. Select the Test Connection button to verify whether the server is able to open a TCP connection as the specified IP/port.

Only applicable when Client mode is used above.

ERemote Port6660

The port on which to connect.

Only applicable when Client mode is used above.

FOverride Local BindingNo

Select Yes to override the local address and port that the client socket will be bound to. Select No to use the default values of 0.0.0.0:0. A local port of zero (0) indicates that the OS should assign an ephemeral port automatically.

Note that if a specific (non-zero) local port is chosen, then after a socket is closed it is up to the underlying OS to release the port before the next socket creation, otherwise the bind attempt will fail.

Only applicable when Client mode is used above.

GLocal Address0.0.0.0

The local address that the client socket will be bound to, if Override Local Binding is enabled.

If Server mode is used above, this will determine what interfaces to listen on for incoming connections.

HLocal Port0

The local port that the client socket will be bound to, if Override Local Binding is enabled.

Note that if a specific (non-zero) local port is chosen, then after a socket is closed it is up to the underlying OS to release the port before the next socket creation, otherwise the bind attempt will fail.

If Server mode is used above, this will determine what port to listen on for incoming connections.

IMax Connections10The maximum number of client connections to accept at once. After this number has been reached, subsequent socket requests will result in a rejection. Only applicable when the Server mode is used above
JKeep Connection OpenNo

Select Yes to keep the connection to the host open across multiple messages. Select No to immediately close the connection to the host after sending each message.

Only applicable when Client mode is used above.

KCheck Remote HostNo

Select Yes to check if the remote host has closed the connection before each message. Select No to assume the remote host has not closed the connection. Checking the remote host will decrease throughput but will prevent the message from erroring if the remote side closed the connection and queuing is disabled.

Only applicable when Client mode is used above.

LSend Timeout (ms)5000

The number of milliseconds to keep the connection to the host open, if Keep Connection Open is enabled. If zero, the connection will be kept open indefinitely.

Only applicable when Client mode is used above.

MBuffer Size (bytes)65536The size, in bytes, of the buffer to hold messages waiting to be sent. Generally, the default value is fine.
NResponse Timeout (ms)5000The number of milliseconds the connector should wait whenever attempting to create a new connection or attempting to read from the remote socket. If Ignore Response is checked, the connector will not wait for a response at all after sending a message.
OQueue on Response TimeoutYesIf enabled, the message is queued when a timeout occurs while waiting for a response. Otherwise, the message is set to ERROR when a timeout occurs. This setting has no effect unless queuing is enabled for the connector.
PData TypeTextSelect Binary if the outbound message is a Base64 string (will be decoded before it is sent out). Select Text if the outbound message is textual (will be encoded with the specified character set encoding).
QEncodingDefaultSelect the character set encoding used by the message sender, or select Default to use the default character set encoding for the JVM Mirth® Connect by NextGen Healthcareis running on.
RTemplate${message.encodedData}The actual payload to send to the remote server. By default the encoded data of this destination will be used. Velocity Variable Replacement is supported here.