Skip to main content

ListenUDP

Description

Listens for Datagram Packets on a given port. The default behavior produces a FlowFile per datagram, however for higher throughput the Max Batch Size property may be increased to specify the number of datagrams to batch together in a single FlowFile. This processor can be restricted to listening for datagrams from a specific remote host and port by specifying the Sending Host and Sending Host Port properties, otherwise it will listen for datagrams from all hosts and ports.

Tags

ingest, listen, source, udp

Properties

In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Local Network InterfaceLocal Network InterfaceThe name of a local network interface to be used to restrict listening to a specific LAN.

Supports Expression Language, using Environment variables.
Port *PortThe port to listen on for communication.

Supports Expression Language, using Environment variables.
Receive Buffer Size *Receive Buffer Size65507 BThe size of each buffer used to receive messages. Adjust this value appropriately based on the expected size of the incoming messages.
Max Size of Message Queue *Max Size of Message Queue10000The 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.
Max Size of Socket Buffer *Max Size of Socket Buffer1 MBThe 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.
Character Set *Character SetUTF-8Specifies the character set of the received data.
Max Batch Size *Max Batch Size1The maximum number of messages to add to a single FlowFile. If multiple messages are available, they will be concatenated along with the <Message Delimiter> up to this configured maximum number of messages
Batching Message Delimiter *Message Delimiter\nSpecifies the delimiter to place between messages when multiple messages are bundled together (see <Max Batch Size> property).
Sending HostSending HostIP, or name, of a remote host. Only Datagrams from the specified Sending Host Port and this host will be accepted. Improves Performance. May be a system property or an environment variable.

Supports Expression Language, using Environment variables.
Sending Host PortSending Host PortPort being used by remote host to send Datagrams. Only Datagrams from the specified Sending Host and this port will be accepted. Improves Performance. May be a system property or an environment variable.

Supports Expression Language, using Environment variables.

Dynamic Properties

This component does not support dynamic properties.

Relationships

NameDescription
successMessages received successfully will be sent out this relationship.

Reads Attributes

This processor does not read attributes.

Writes Attributes

NameDescription
udp.portThe sending port the messages were received.
udp.senderThe sending host of the messages.

State Management

This component does not store state.

Restricted

This component is not restricted.

Input Requirement

This component does not allow an incoming relationship.

System Resource Considerations

This component does not specify system resource considerations.

See Also