---
schema_version: "1"
id: ec64f68a2aa9b4365a61592459809132421e391dae9f7e0ca85b069f419c2dd5
title: Sockets Connector Reference
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/sockets-connector/latest/sockets-documentation.md
canonical_url: https://docs.mulesoft.com/sockets-connector/latest/sockets-documentation
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 66467714b62845d7b49a122dc2d45cca2603bfd0af860b8575256deb77d3d8ef
description: MuleSoft Documentation Site
release: "1.2"
latest: true
---
---
product: Sockets Connector
version: 1.2
is-latest-version: true
---

# Sockets Connector Reference

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Sockets Connector v1.2

Anypoint Connector for Sockets (Sockets Connector) provides a sockets listener, send capability, and
send and receive functionality. Provides TCP and UDP requesters.

Release Notes: [Sockets Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/connector-sockets)

## Configurations

---

### Listener Config

Config for listener sockets

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The name for this configuration. Connectors reference the configuration with this name.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Connection</strong></p></td><td><div><div><ul><li><p><a href="#listener-config_tcp-listener">Tcp Listener</a></p></li><li><p><a href="#listener-config_udp-listener">Udp Listener</a></p></li></ul></div></div></td><td><div><div><p>The connection types to provide to this configuration.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Expiration Policy</strong></p></td><td><div><div><p><a href="#ExpirationPolicy">Expiration Policy</a></p></div></div></td><td><div><div><p>Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. Mule purges the instances as appropriate.</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

#### Connection Types

##### Tcp Listener

A ConnectionProvider which provides instances of TcpListenerConnection to use by SocketListener

###### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Protocol</strong></p></td><td><div><div><p>One of:</p></div><div><ul><li><p><a href="#SafeProtocol">Safe Protocol</a></p></li><li><p><a href="#DirectProtocol">Direct Protocol</a></p></li><li><p><a href="#LengthProtocol">Length Protocol</a></p></li><li><p><a href="#StreamingProtocol">Streaming Protocol</a></p></li><li><p><a href="#XmlMessageProtocol">XML Message Protocol</a></p></li><li><p><a href="#xml-message-eof-protocol">XML Message Eof Protocol</a></p></li><li><p><a href="#CustomProtocol">Custom Protocol</a></p></li><li><p><a href="#eof-protocol">Eof Protocol</a></p></li><li><p><a href="#CustomClassLoadingLengthProtocol">Custom Class Loading Length Protocol</a></p></li></ul></div></div></td><td><div><div><p>TcpProtocol that knows how the data is read and written. If not specified, uses SafeProtocol.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>TLS Configuration</strong></p></td><td><div><div><p><a href="#Tls">Tls</a></p></div></div></td><td><div><div><p>Implies the use of SSLServerSocket instead of plain TCP ServerSocket for accepting new SSL connections.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Port</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Connection’s port number</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Host</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Connection’s host name</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Reconnection</strong></p></td><td><div><div><p><a href="#Reconnection">Reconnection</a></p></div></div></td><td><div><div><p>When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Send Buffer Size</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>The size of the buffer (in bytes) used when sending data, set on the socket itself.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Receive Buffer Size</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>The size of the buffer (in bytes) used when receiving data, set on the socket itself.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Client Timeout</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Sets the SO_TIMEOUT value on sockets, and indicates the amount of time (in milliseconds) that the socket waits in a blocking operation before failing. A value of 0 (default) indicates waiting indefinitely.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Reuse Address</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Sets SO_REUSEADDRESS (default) value on the sockets before binding, which helps reduce "address already in use" errors when a socket is reused.</p></div></div></td><td><div><div><p>true</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Send TCP With No Delay</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>If set, it does not collect transmitted data together for greater efficiency but sends it immediately. Defaults to true even though socket default is false, because optimizing to reduce amount of network traffic over latency is hardly ever a concern today.</p></div></div></td><td><div><div><p>true</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Linger</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Sets SO_LINGER value, and indicates how long (in milliseconds) the socket takes to close, so any remaining data transmits correctly.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Keep Alive</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Enables SO_KEEPALIVE behavior on open sockets. This automatically checks open socket connections but unused for long periods and closes them if the connection becomes unavailable. This is a property on the socket itself and a server socket uses it to control whether connections to the server keep alive before they recycle.</p></div></div></td><td><div><div><p>false</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Fail On Unresolved Host</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Whether the socket fails during its creation if the host set on the endpoint cannot be resolved. However, set it to false to allow unresolved hosts, which is useful when connecting through a proxy.</p></div></div></td><td><div><div><p>true</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Server Timeout</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Sets SO_TIMEOUT value when you use the socket as a server. The timeout that applies to the "accept" operation. If no connection arrives, a value of 0 (default) causes the accept to wait indefinitely.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Receive Backlog</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>The maximum queue length for incoming connections.</p></div></div></td><td><div><div><p>50</p></div></div></td><td><div></div></td></tr></tbody></table>

##### UDP Listener

A ConnectionProvider which provides instances of UdpListenerConnection to use by SocketListener

###### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Port</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Connection’s port number</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Host</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Connection’s host name</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Reconnection</strong></p></td><td><div><div><p><a href="#Reconnection">Reconnection</a></p></div></div></td><td><div><div><p>When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Send Buffer Size</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>The size of the buffer (in bytes) used when sending data, set on the socket itself.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Receive Buffer Size</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>The size of the buffer (in bytes) used when receiving data, set on the socket itself.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Client Timeout</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Sets the SO_TIMEOUT value on sockets, and indicates the amount of time (in milliseconds) that the socket waits in a blocking operation before failing. A value of 0 (default) indicates waiting indefinitely.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Reuse Address</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Sets SO_REUSEADDRESS (default) value on the sockets before binding, which helps reduce "address already in use" errors when a socket is reused.</p></div></div></td><td><div><div><p>true</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Broadcast</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Enable or disable SO_BROADCAST value into the DatagramSocket</p></div></div></td><td><div><div><p>false</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Associated Sources

- [Listener](#listener)

---

### Request Config

Config for requester sockets

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The name for this configuration. Connectors reference the configuration with this name.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Connection</strong></p></td><td><div><div><ul><li><p><a href="#request-config_tcp-requester">Tcp Requester</a></p></li><li><p><a href="#request-config_udp-requester">Udp Requester</a></p></li></ul></div></div></td><td><div><div><p>The connection types to provide to this configuration.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Expiration Policy</strong></p></td><td><div><div><p><a href="#ExpirationPolicy">Expiration Policy</a></p></div></div></td><td><div><div><p>Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. Mule purges the instances as appropriate.</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

#### Connection Types

##### Tcp Requester

A ConnectionProvider which provides instances of TcpRequesterConnection to use by the
SocketOperations

###### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Local Address Settings</strong></p></td><td><div><div><p><a href="#SocketConnectionSettings">Socket Connection Settings</a></p></div></div></td><td><div><div><p>This configuration parameter refers to the address where the Socket should bind to.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Protocol</strong></p></td><td><div><div><p>One of:</p></div><div><ul><li><p><a href="#SafeProtocol">Safe Protocol</a></p></li><li><p><a href="#DirectProtocol">Direct Protocol</a></p></li><li><p><a href="#LengthProtocol">Length Protocol</a></p></li><li><p><a href="#StreamingProtocol">Streaming Protocol</a></p></li><li><p><a href="#XmlMessageProtocol">XML Message Protocol</a></p></li><li><p><a href="#xml-message-eof-protocol">XML Message Eof Protocol</a></p></li><li><p><a href="#CustomProtocol">Custom Protocol</a></p></li><li><p><a href="#eof-protocol">Eof Protocol</a></p></li><li><p><a href="#CustomClassLoadingLengthProtocol">Custom Class Loading Length Protocol</a></p></li></ul></div></div></td><td><div><div><p>TcpProtocol that knows how the data is read and written. If not specified, the SafeProtocol will be used.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>TLS Configuration</strong></p></td><td><div><div><p><a href="#Tls">Tls</a></p></div></div></td><td><div><div><p>Implies the use of SSLServerSocket instead of plain TCP ServerSocket for accepting new SSL connections.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Port</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Connection’s port number</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Host</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Connection’s host name</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Reconnection</strong></p></td><td><div><div><p><a href="#Reconnection">Reconnection</a></p></div></div></td><td><div><div><p>When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Pooling Profile</strong></p></td><td><div><div><p><a href="#PoolingProfile">Pooling Profile</a></p></div></div></td><td><div><div><p>Characteristics of the connection pool</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Send Buffer Size</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>The size of the buffer (in bytes) used when sending data, set on the socket itself.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Receive Buffer Size</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>The size of the buffer (in bytes) used when receiving data, set on the socket itself.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Client Timeout</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Sets the SO_TIMEOUT value on sockets, and indicates the amount of time (in milliseconds) that the socket waits in a blocking operation before failing. A value of 0 (default) indicates waiting indefinitely.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Reuse Address</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Sets SO_REUSEADDRESS (default) value on the sockets before binding, which helps reduce "address already in use" errors when a socket is reused.</p></div></div></td><td><div><div><p>true</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Send TCP With No Delay</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>If set, it does not collect transmitted data together for greater efficiency but sends it immediately. Defaults to true even though socket default is false, because optimizing to reduce amount of network traffic over latency is hardly ever a concern today.</p></div></div></td><td><div><div><p>true</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Linger</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Sets SO_LINGER value, and indicates how long (in milliseconds) the socket takes to close, so any remaining data transmits correctly.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Keep Alive</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Enables SO_KEEPALIVE behavior on open sockets. This automatically checks open socket connections but unused for long periods and closes them if the connection becomes unavailable. This is a property on the socket itself and a server socket uses it to control whether connections to the server keep alive before they recycle.</p></div></div></td><td><div><div><p>false</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Fail On Unresolved Host</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Whether the socket fails during its creation and if the host set on the endpoint cannot be resolved. However, set it to false to allow unresolved hosts, which is useful when connecting through a proxy.</p></div></div></td><td><div><div><p>true</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Connection Timeout</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Number of milliseconds to wait until an outbound connection to a remote server is successfully created. Defaults to 30 seconds.</p></div></div></td><td><div><div><p>30</p></div></div></td><td><div></div></td></tr></tbody></table>

##### UDP Requester

A ConnectionProvider which provides instances of UdpRequesterConnection to use by the
SocketOperations

###### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Local Address Settings</strong></p></td><td><div><div><p><a href="#SocketConnectionSettings">Socket Connection Settings</a></p></div></div></td><td><div><div><p>This configuration parameter refers to the address where the DatagramSocket should bind to.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Port</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Connection’s port number</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Host</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Connection’s host name</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Reconnection</strong></p></td><td><div><div><p><a href="#Reconnection">Reconnection</a></p></div></div></td><td><div><div><p>When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Pooling Profile</strong></p></td><td><div><div><p><a href="#PoolingProfile">Pooling Profile</a></p></div></div></td><td><div><div><p>Characteristics of the connection pool</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Send Buffer Size</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>The size of the buffer (in bytes) used when sending data, set on the socket itself.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Receive Buffer Size</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>The size of the buffer (in bytes) used when receiving data, set on the socket itself.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Client Timeout</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Sets the SO_TIMEOUT value on sockets, and indicates the amount of time (in milliseconds) that the socket waits in a blocking operation before failing. A value of 0 (default) indicates waiting indefinitely.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Reuse Address</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Sets SO_REUSEADDRESS (default) value on the sockets before binding, which helps reduce "address already in use" errors when a socket is reused.</p></div></div></td><td><div><div><p>true</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Broadcast</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Enable or disable SO_BROADCAST value into the DatagramSocket</p></div></div></td><td><div><div><p>false</p></div></div></td><td><div></div></td></tr></tbody></table>

## Supported Operations

- [Send](#send)

- [Send And Receive](#sendAndReceive)

## Operations

### Send

`<sockets:send>`

Sends the data using the client associated to the RequesterConnection.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Configuration</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The name of the configuration to use.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Content</strong></p></td><td><div><div><p>Binary</p></div></div></td><td><div><div><p>data that will be serialized and sent through the socket.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Reconnection Strategy</strong></p></td><td><div><div><ul><li><p><a href="#reconnect">Reconnect</a></p></li><li><p><a href="#reconnect-forever">Reconnect Forever</a></p></li></ul></div></div></td><td><div><div><p>A retry strategy in case of connectivity errors</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### For Configurations

- [Request Config](#request-config)

#### Throws

- SOCKETS:UNKNOWN\_HOST

- SOCKETS:CONNECTIVITY

- SOCKETS:CONNECTION\_TIMEOUT

- SOCKETS:RETRY\_EXHAUSTED

- SOCKETS:LENGTH\_EXCEEDED

### Send And Receive

`<sockets:send-and-receive>`

Sends the data using the client associated to the RequesterConnection and then blocks until a
response is received or the timeout is met, in which case the operation returns a null payload.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Configuration</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The name of the configuration to use.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Content</strong></p></td><td><div><div><p>Binary</p></div></div></td><td><div><div><p>data that will be serialized and sent through the socket.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The mime type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#repeatable-in-memory-stream">Repeatable In Memory Stream</a></p></li><li><p><a href="#repeatable-file-store-stream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configure if repeatable streams should be used and their behavior</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The name of a variable to store the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>An expression to evaluate against the operation’s output and store the expression outcome in the target variable</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Reconnection Strategy</strong></p></td><td><div><div><ul><li><p><a href="#reconnect">Reconnect</a></p></li><li><p><a href="#reconnect-forever">Reconnect Forever</a></p></li></ul></div></div></td><td><div><div><p>A retry strategy in case of connectivity errors</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Binary</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p><a href="#ImmutableSocketAttributes">Immutable Socket Attributes</a></p></div></div></td></tr></tbody></table>

### For Configurations

- [Request Config](#request-config)

#### Throws

- SOCKETS:UNKNOWN\_HOST

- SOCKETS:CONNECTIVITY

- SOCKETS:CONNECTION\_TIMEOUT

- SOCKETS:RETRY\_EXHAUSTED

- SOCKETS:LENGTH\_EXCEEDED

## Sources

### Listener

`<sockets:listener>`

Listens for socket connections of the given protocol in the configured host and port. Whenever a new
connection is received, this Source will schedule a SocketWorker that will handle the communication
for that particular connection.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Configuration</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The name of the configuration to use.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The mime type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Primary Node Only</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Whether this source should only executes on the primary node when running in a cluster</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#repeatable-in-memory-stream">Repeatable In Memory Stream</a></p></li><li><p><a href="#repeatable-file-store-stream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configure if repeatable streams should be used and their behavior</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Redelivery Policy</strong></p></td><td><div><div><p><a href="#RedeliveryPolicy">Redelivery Policy</a></p></div></div></td><td><div><div><p>Defines a policy for processing the redelivery of the same message</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Reconnection Strategy</strong></p></td><td><div><div><ul><li><p><a href="#reconnect">Reconnect</a></p></li><li><p><a href="#reconnect-forever">Reconnect Forever</a></p></li></ul></div></div></td><td><div><div><p>A retry strategy in case of connectivity errors</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Response Value</strong></p></td><td><div><div><p>Binary</p></div></div></td><td><div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Binary</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p><a href="#ImmutableSocketAttributes">Immutable Socket Attributes</a></p></div></div></td></tr></tbody></table>

### For Configurations

- [Listener Config](#listener-config)

## Types

### Tls

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Enabled Protocols</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>A comma-separated list of protocols enabled for this context.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Enabled Cipher Suites</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>A comma-separated list of cipher suites enabled for this context.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Trust Store</strong></p></td><td><div><div><p><a href="#TrustStore">Trust Store</a></p></div></div></td><td><div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Key Store</strong></p></td><td><div><div><p><a href="#KeyStore">Key Store</a></p></div></div></td><td><div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Revocation Check</strong></p></td><td><div><div><ul><li><p><a href="#standard-revocation-check">Standard Revocation Check</a></p></li><li><p><a href="#custom-ocsp-responder">Custom Ocsp Responder</a></p></li><li><p><a href="#crl-file">Crl File</a></p></li></ul></div></div></td><td><div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Trust Store

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Path</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The location of the trust store. This location resolves relative to the current classpath and file system, if possible.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Password</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The password used to protect the trust store.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The type of store used.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Algorithm</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The algorithm used by the trust store.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Insecure</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>If true, no certificate validations are performed, rendering connections vulnerable to attacks. Use at your own risk.</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Key Store

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Path</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The location of the trust store. This location resolves relative to the current classpath and file system, if possible.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The type of store used.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Alias</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>When the key store contains many private keys, this attribute indicates the alias of the key to use. If not defined, the first key in the file is used by default.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Key Password</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The password used to protect the private key.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Password</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The password used to protect the key store.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Algorithm</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The algorithm used by the key store.</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Standard Revocation Check

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Only End Entities</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Only verify the last element of the certificate chain.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Prefer Crls</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Try CRL instead of OCSP first.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>No Fallback</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Do not use the secondary checking method.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Soft Fail</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Avoid verification failure when the revocation server can not be reached or is busy.</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Custom Ocsp Responder

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Url</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The URL of the OCSP responder.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Cert Alias</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Alias of the signing certificate for the OCSP response (must be in the trust store), if present.</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Crl File

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Path</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The path to the CRL file.</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Reconnection

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Fails Deployment</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Reconnection Strategy</strong></p></td><td><div><div><ul><li><p><a href="#reconnect">Reconnect</a></p></li><li><p><a href="#reconnect-forever">Reconnect Forever</a></p></li></ul></div></div></td><td><div><div><p>The reconnection strategy to use.</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Reconnect

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Frequency</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>How often in milliseconds to reconnect</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Count</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>How many reconnection attempts to make.</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Reconnect Forever

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Frequency</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>How often in milliseconds to reconnect</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Expiration Policy

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Max Idle Time</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>A scalar time value for the maximum amount of time a dynamic configuration instance should be allowed to be idle before it’s considered eligible for expiration</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Time Unit</strong></p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>NANOSECONDS</p></li><li><p>MICROSECONDS</p></li><li><p>MILLISECONDS</p></li><li><p>SECONDS</p></li><li><p>MINUTES</p></li><li><p>HOURS</p></li><li><p>DAYS</p></li></ul></div></div></td><td><div><div><p>A time unit that qualifies the maxIdleTime attribute</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Immutable Socket Attributes

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Port</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Host Address</strong></p></td><td><div><div><p>String</p></div></div></td><td><div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Host Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Local Certificates</strong></p></td><td><div><div><p>Array of Any</p></div></div></td><td><div><div><p>The SSL local certificates. If the Socket is not an SSL Sockets, this is null.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Peer Certificates</strong></p></td><td><div><div><p>Array of Any</p></div></div></td><td><div><div><p>The SSL peer certificates. If the Socket is not an SSL Sockets, this is null.</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Repeatable In Memory Stream

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Initial Buffer Size</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>The allocated amount of memory to consume the stream and provide random access to it. If the stream contains more data than can be fit into this buffer, then the buffer expands according to the bufferSizeIncrement attribute, with an upper limit of maxInMemorySize.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Buffer Size Increment</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer does not expand, and STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Max Buffer Size</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>The maximum amount of memory to use. If more than that is used then a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised. A value lower than or equal to zero means no limit.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Buffer Unit</strong></p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>BYTE</p></li><li><p>KB</p></li><li><p>MB</p></li><li><p>GB</p></li></ul></div></div></td><td><div><div><p>The unit in which all these attributes are expressed</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Repeatable File Store Stream

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>In Memory Size</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Defines the maximum memory that the stream should use to keep data in memory. If more than that is consumed content on the disk is buffered.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Buffer Unit</strong></p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>BYTE</p></li><li><p>KB</p></li><li><p>MB</p></li><li><p>GB</p></li></ul></div></div></td><td><div><div><p>The unit in which maxInMemorySize is expressed</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Redelivery Policy

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Max Redelivery Count</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>The maximum number of times a message can be redelivered and processed unsuccessfully before triggering process-failed-message</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Use Secure Hash</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Whether to use a secure hash algorithm to identify a redelivered message.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Message Digest Algorithm</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The secure hashing algorithm to use. If not set, defaults to SHA-256.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Id Expression</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Defines one or more expressions to use to determine when a message is redelivered. This property may only be set if useSecureHash is false.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Object Store</strong></p></td><td><div><div><p>Object Store</p></div></div></td><td><div><div><p>The object store to store the redelivery counter for each message.</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Socket Connection Settings

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Port</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Connection’s port number</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Host</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Connection’s host name</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr></tbody></table>

### Pooling Profile

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Max Active</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Controls the maximum number of Mule components that can be borrowed from a session at one time. When set to a negative value, there is no limit to the number of components that can be active at one time. When maxActive is exceeded, the pool exhausts.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Max Idle</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Controls the maximum number of Mule components that can sit idle in the pool at any time. When set to a negative value, there is no limit to the number of Mule components that can be idle at one time.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Max Wait</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Specifies the number of milliseconds to wait for a pooled component to become available when the pool is exhausted and the exhaustedAction is set to WHEN_EXHAUSTED_WAIT.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Min Eviction Millis</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Determines the minimum amount of time an object may sit idle in the pool before it is eligible for eviction. When nonpositive, no objects will be evicted from the pool due to idle time alone.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Eviction Check Interval Millis</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Specifies the number of milliseconds between runs of the object evictor. When non-positive, no object evictor is executed.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Exhausted Action</strong></p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>WHEN_EXHAUSTED_GROW</p></li><li><p>WHEN_EXHAUSTED_WAIT</p></li><li><p>WHEN_EXHAUSTED_FAIL</p></li></ul></div></div></td><td><div><div><p>Specifies the behavior of the Mule component pool when the pool is exhausted. Possible values are: WHEN_EXHAUSTED_FAIL, which throws a NoSuchElementException, WHEN_EXHAUSTED_WAIT, which blocks by invoking Object.wait(long) until a new or idle object is available, or WHEN_EXHAUSTED_GROW, which creates a new Mule instance and return it, essentially making maxActive meaningless. If a positive maxWait value is supplied, it blocks for at most that many milliseconds, after which a NoSuchElementException will be thrown. If maxThreadWait is a negative value, it blocks indefinitely.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Initialisation Policy</strong></p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>INITIALISE_NONE</p></li><li><p>INITIALISE_ONE</p></li><li><p>INITIALISE_ALL</p></li></ul></div></div></td><td><div><div><p>Determines how components in a pool can initialize. The possible values are INITIALISE_NONE does not load any components into the pool on startup, INITIALISE_ONE loads one initial component into the pool on startup, or INITIALISE_ALL loads all components in the pool on startup</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Disabled</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Whether pooling should be disabled</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Safe Protocol

This test protocol precedes every message with a cookie, and should not be used in production
environments.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Max Message Length</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Indicates the maximum length of the message.</p></div></div></td><td><div><div><p>-1</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Indicates the encoding used for serializing the cookie</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Rethrow Exception On Read</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Indicates if the exception should be rethrown if there is a failure while reading</p></div></div></td><td><div><div><p>false</p></div></div></td><td><div></div></td></tr></tbody></table>

### Direct Protocol

This protocol allows the socket to read until no more bytes are immediately available. On slow
networks, `EOFProtocol` and `LengthProtocol` might be more reliable.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Rethrow Exception On Read</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Indicates if the exception should be rethrown if there is a failure while reading</p></div></div></td><td><div><div><p>false</p></div></div></td><td><div></div></td></tr></tbody></table>

### Length Protocol

This protocol is defined by sending or reading an integer (the packet length) and then the data to
transfer.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Max Message Length</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Indicates the maximum length of the message.</p></div></div></td><td><div><div><p>-1</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Rethrow Exception On Read</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Indicates if the exception should be rethrown if there is a failure while reading</p></div></div></td><td><div><div><p>false</p></div></div></td><td><div></div></td></tr></tbody></table>

### Streaming Protocol

This protocol allows the socket’s Send operation to return a message with the original InputStream
as payload.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Rethrow Exception On Read</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Indicates if the exception should be rethrown if there is a failure while reading</p></div></div></td><td><div><div><p>false</p></div></div></td><td><div></div></td></tr></tbody></table>

### XML Message Protocol

This protocol reads streaming XML documents. The only requirement is that each document includes an
XML declaration at the beginning of the document in the form of `<?xml…​.`. Data is read until a new
document is found or until there is no more currently available data. For slower networks,
`XmlMessageEofProtocol` might be more reliable. Also, because the default character encoding for
Anypoint Platform is used to decode the message bytes when looking for the XML declaration, some
caution with message character encodings is warranted.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Rethrow Exception On Read</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Indicates if the exception should be rethrown if there is a failure while reading</p></div></div></td><td><div><div><p>false</p></div></div></td><td><div></div></td></tr></tbody></table>

### XML Message Eof Protocol

This protocol extends `XmlMessageProtocol` to continue reading until either a new message or EOF is
found.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Rethrow Exception On Read</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Indicates if the exception should be rethrown if there is a failure while reading</p></div></div></td><td><div><div><p>false</p></div></div></td><td><div></div></td></tr></tbody></table>

### Custom Protocol

Define your own custom protocol by writing a class that extends `TcpProtocol`.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Class</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Reference to full qualifier class name that should extend TcpProtocol to use as a custom protocol</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr></tbody></table>

### Eof Protocol

When clients connect to a server using the EOF protocol, they write the message on the socket
connection output stream. To signal the end of the message, clients must signal the end of file
(EOF) by closing the output stream and keeping the input stream open, waiting for a response from
the server. This behavior is known as half-close. Then, the server sends a response and closes its
output stream and the whole socket connection.

For TLS secured connections, use TLS 1.3 and JDK 11 as the half-close feature is not supported in
TLS 1.2 and earlier versions. The half-close feature triggers the close notification alert to
prevent TLS truncation attacks. JDK 11 and newer versions support TLS 1.3. Also, pooling profile is
not compatible with `EofProtocol`.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Rethrow Exception On Read</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Indicates if the exception should be rethrown if there is a failure while reading</p></div></div></td><td><div><div><p>false</p></div></div></td><td><div></div></td></tr></tbody></table>

### Custom Class Loading Length Protocol

A length protocol that uses a specific class loader to load objects from streams.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Class Loader</strong></p></td><td><div><div><p>Any</p></div></div></td><td><div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Max Message Length</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Indicates the maximum length of the message.</p></div></div></td><td><div><div><p>-1</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Rethrow Exception On Read</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Indicates if the exception should be rethrown if there is a failure while reading</p></div></div></td><td><div><div><p>false</p></div></div></td><td><div></div></td></tr></tbody></table>

## See Also

- [Salesforce Help](https://help.salesforce.com)
