ListenUDPRecord 2025.10.9.21

Bundle

org.apache.nifi | nifi-standard-nar

Description

Listens for Datagram Packets on a given port and reads the content of each datagram using the configured Record Reader. Each record will then be written to a flow file using the configured Record Writer. 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, record, source, udp

Input Requirement

FORBIDDEN

Supports Sensitive Dynamic Properties

false

Properties

PropertyDescription
Character SetSpecifies the character set of the received data.
Local Network InterfaceThe name of a local network interface to be used to restrict listening to a specific LAN.
Max Size of Message QueueThe 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 BufferThe 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.
PortThe port to listen on for communication.
Receive Buffer SizeThe size of each buffer used to receive messages. Adjust this value appropriately based on the expected size of the incoming messages.
batch-sizeThe maximum number of datagrams to write as records to a single FlowFile. The Batch Size will only be reached when data is coming in more frequently than the Poll Timeout.
poll-timeoutThe amount of time to wait when polling the internal queue for more datagrams. If no datagrams are found after waiting for the configured timeout, then the processor will emit whatever records have been obtained up to that point.
record-readerThe Record Reader to use for reading the content of incoming datagrams.
record-writerThe Record Writer to use in order to serialize the data before writing to a flow file.
sending-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.
sending-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.

Relationships

NameDescription
parse.failureIf a datagram cannot be parsed using the configured Record Reader, the contents of the message will be routed to this Relationship as its own individual FlowFile.
successMessages received successfully will be sent out this relationship.

Writes attributes

NameDescription
udp.senderThe sending host of the messages.
udp.portThe sending port the messages were received.
record.countThe number of records written to the flow file.
mime.typeThe mime-type of the writer used to write the records to the flow file.