Most of the application now a days provide plugins to send data directly over TCP or UDP ports. Common example would be logstash which gathers logs does have facility of sending its data over UDP or TCP port.
Both processors ListenUDP and ListenTCP behaves same it starts listener on the specified port on the NiFi servers and keep listening for any incoming data to those ports.
How to configure ListenUDP processor
Lets create a sample flow with help of ListenUDP and LogMessage processor and it will look like this
To configure ListenUDP right click that processor and click on configure then click on properties
Properties in Bold are mandatory properties so give the Port value here for testing purpose we are using port 1234 mentioning local network interface is not mandatory
How to test ListenUDP Processor
To test if your flow is working properly you can use netcat command
Below command can be use to send some test UDP data over port 1234
nc -u nifiserverip 1234
This will open connection to UDP port and you can type data to send that data over UDP port
nc -u nifiserverip 1234 1 2 3 4 5 6
On NiFi canvas you can see that succesfully received and queued in the queue