Appearance
UDP server
Listens on a UDP port and emits every received datagram as a UdpDatagram record. Use it to receive telemetry, syslog-style messages or device notifications sent over UDP. The component keeps the flow running.
Pins
| Pin | Kind | Types | Description |
|---|---|---|---|
| Start | start | any | Starts the server. When unconnected, the server starts with the flow. |
| Output | output | Viaducta.Plugins.UdpTypes.UdpDatagram | One record per received datagram, with new metadata. |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
Port | integer (1-65535) | 7000 | Required. UDP port to listen on (all local interfaces). |
WorkerCount | integer (1-255) | 1 | Intended number of parallel workers for Output (see Notes). |
MaxOutstandingRequests | integer | 0 | Maximum number of received datagrams waiting for processing; 0 = unlimited. When the limit is reached, new datagrams are dropped. |
ReceiveBufferSize | integer (KB, 8-2048) | 64 | Socket receive buffer. Increase it for bursts, otherwise the OS drops datagrams. |
Behaviour
- The server binds
Porton all interfaces, either when the flow starts (Startunconnected) or whenStartis called. - Received datagrams are put into an internal in-memory queue and dispatched to
Outputone by one asUdpDatagramwithIPandPortof the sender andData(the payload bytes). Each datagram gets new metadata. - If
Outputhas no connections, received datagrams are discarded. - When the queue holds
MaxOutstandingRequestsitems, further datagrams are silently dropped until it drains. - The socket is closed and the queue cleared when the flow stops.
Notes
WorkerCounthas no effect: the dispatcher callsOutputsynchronously from a single thread, so datagrams are always processed one at a time. To process in parallel, hand them to an asynchronous component (for example a queue) right after the server.- There is no reply pin; to answer a sender, use a UDP client with its address and port.
- The
MaxOutstandingRequestsfield validator has a minimum of1, although0(unlimited) is the default and is accepted by the code. - Calling
Starta second time tries to bind the port again and fails; trigger it only once. - Datagrams waiting in the queue are lost when the flow stops.
Example
json
{ "Port": 5140, "WorkerCount": 1, "MaxOutstandingRequests": 10000, "ReceiveBufferSize": 512 }UDP server → (decode Data to text) → Bulk insert