blob: 261d17b074277f517c08f072a85cfa7b7f5a7dde [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>ListenTCP</title><link rel="stylesheet" href="../../../../../css/component-usage.css" type="text/css"></link></head><script type="text/javascript">window.onload = function(){if(self==top) { document.getElementById('nameHeader').style.display = "inherit"; } }</script><body><h1 id="nameHeader" style="display: none;">ListenTCP</h1><h2>Description: </h2><p>Listens for incoming TCP connections and reads data from each connection using a line separator as the message demarcator. The default behavior is for each message to produce a single FlowFile, however this can be controlled by increasing the Batch Size to a larger value for higher throughput. The Receive Buffer Size must be set as large as the largest messages expected to be received, meaning if every 100kb there is a line separator, then the Receive Buffer Size must be greater than 100kb. The processor can be configured to use an SSL Context Service to only allow secure connections. When connected clients present certificates for mutual TLS authentication, the Distinguished Names of the client certificate's issuer and subject are added to the outgoing FlowFiles as attributes. The processor does not perform authorization based on Distinguished Name values, but since these values are attached to the outgoing FlowFiles, authorization can be implemented based on these attributes.</p><h3>Tags: </h3><p>listen, tcp, tls, ssl</p><h3>Properties: </h3><p>In the list below, the names of required properties appear in <strong>bold</strong>. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the <a href="../../../../../html/expression-language-guide.html">NiFi Expression Language</a>.</p><table id="properties"><tr><th>Display Name</th><th>API Name</th><th>Default Value</th><th>Allowable Values</th><th>Description</th></tr><tr><td id="name">Local Network Interface</td><td>Local Network Interface</td><td></td><td id="allowable-values"></td><td id="description">The name of a local network interface to be used to restrict listening to a specific LAN.<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name"><strong>Port</strong></td><td>Port</td><td></td><td id="allowable-values"></td><td id="description">The port to listen on for communication.<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name"><strong>Receive Buffer Size</strong></td><td>Receive Buffer Size</td><td id="default-value">65507 B</td><td id="allowable-values"></td><td id="description">The size of each buffer used to receive messages. Adjust this value appropriately based on the expected size of the incoming messages.</td></tr><tr><td id="name"><strong>Max Size of Message Queue</strong></td><td>Max Size of Message Queue</td><td id="default-value">10000</td><td id="allowable-values"></td><td id="description">The maximum size of the internal queue used to buffer messages being transferred from the underlying channel to the processor. Setting this value higher allows more messages to be buffered in memory during surges of incoming messages, but increases the total memory used by the processor during these surges.</td></tr><tr><td id="name"><strong>Max Size of Socket Buffer</strong></td><td>Max Size of Socket Buffer</td><td id="default-value">1 MB</td><td id="allowable-values"></td><td id="description">The maximum size of the socket buffer that should be used. This is a suggestion to the Operating System to indicate how big the socket buffer should be. If this value is set too low, the buffer may fill up before the data can be read, and incoming data will be dropped.</td></tr><tr><td id="name"><strong>Character Set</strong></td><td>Character Set</td><td id="default-value">UTF-8</td><td id="allowable-values"></td><td id="description">Specifies the character set of the received data.</td></tr><tr><td id="name"><strong>Max Number of Worker Threads</strong></td><td>Max Number of TCP Connections</td><td id="default-value">2</td><td id="allowable-values"></td><td id="description">The maximum number of worker threads available for servicing TCP connections.</td></tr><tr><td id="name"><strong>Max Batch Size</strong></td><td>Max Batch Size</td><td id="default-value">1</td><td id="allowable-values"></td><td id="description">The maximum number of messages to add to a single FlowFile. If multiple messages are available, they will be concatenated along with the &lt;Message Delimiter&gt; up to this configured maximum number of messages</td></tr><tr><td id="name"><strong>Batching Message Delimiter</strong></td><td>Message Delimiter</td><td id="default-value">\n</td><td id="allowable-values"></td><td id="description">Specifies the delimiter to place between messages when multiple messages are bundled together (see &lt;Max Batch Size&gt; property).</td></tr><tr><td id="name"><strong>Idle Connection Timeout</strong></td><td>idle-timeout</td><td id="default-value">0 seconds</td><td id="allowable-values"></td><td id="description">The amount of time a client's connection will remain open if no data is received. The default of 0 seconds will leave connections open until they are closed by the client.</td></tr><tr><td id="name">Max Number of Receiving Message Handler Threads</td><td>max-receiving-threads</td><td></td><td id="allowable-values"></td><td id="description">This property is deprecated and no longer used.</td></tr><tr><td id="name"><strong>Pool Receive Buffers</strong></td><td>pool-receive-buffers</td><td id="default-value">True</td><td id="allowable-values"><ul><li>True</li><li>False</li></ul></td><td id="description">Enable or disable pooling of buffers that the processor uses for handling bytes received on socket connections. The framework allocates buffers as needed during processing.</td></tr><tr><td id="name">SSL Context Service</td><td>SSL Context Service</td><td></td><td id="allowable-values"><strong>Controller Service API: </strong><br/>RestrictedSSLContextService<br/><strong>Implementation: </strong><a href="../../../nifi-ssl-context-service-nar/1.19.1/org.apache.nifi.ssl.StandardRestrictedSSLContextService/index.html">StandardRestrictedSSLContextService</a></td><td id="description">The Controller Service to use in order to obtain an SSL Context. If this property is set, messages will be received over a secure connection.</td></tr><tr><td id="name">Client Auth</td><td>Client Auth</td><td id="default-value">REQUIRED</td><td id="allowable-values"><ul><li>WANT</li><li>REQUIRED</li><li>NONE</li></ul></td><td id="description">The client authentication policy to use for the SSL Context. Only used if an SSL Context Service is provided.</td></tr></table><h3>Relationships: </h3><table id="relationships"><tr><th>Name</th><th>Description</th></tr><tr><td>success</td><td>Messages received successfully will be sent out this relationship.</td></tr></table><h3>Reads Attributes: </h3>None specified.<h3>Writes Attributes: </h3><table id="writes-attributes"><tr><th>Name</th><th>Description</th></tr><tr><td>tcp.sender</td><td>The sending host of the messages.</td></tr><tr><td>tcp.port</td><td>The sending port the messages were received.</td></tr><tr><td>client.certificate.issuer.dn</td><td>For connections using mutual TLS, the Distinguished Name of the Certificate Authority that issued the client's certificate is attached to the FlowFile.</td></tr><tr><td>client.certificate.subject.dn</td><td>For connections using mutual TLS, the Distinguished Name of the client certificate's owner (subject) is attached to the FlowFile.</td></tr></table><h3>State management: </h3>This component does not store state.<h3>Restricted: </h3>This component is not restricted.<h3>Input requirement: </h3>This component does not allow an incoming relationship.<h3>System Resource Considerations:</h3>None specified.</body></html>