# UDP listener and writer

> Configuration reference for the ZAPP UDP listener and writer pipeline components.

---

LLMS index: [llms.txt](/datacenter/zapp/llms.txt)

---

Use `udpListener` to receive ZAPP UDP payload containers. Use `udpWriter` to forward payload batches to another UDP endpoint.

## UDP listener

`udpListener` is a source component. It listens on a local UDP address, decodes ZAPP packets into payload batches, and sends those batches to configured targets.

```yaml
components:
  listener:
    type: udpListener
    network: udp
    address: :9091
    allowedSources:
      - 10.0.0.0/24
    targets:
      - target: payloadProcessor
        cap: 1000
        leaky: true
```

Important fields:

- `network` defaults to `udp` when omitted
- `address` is the local listen address
- `allowedSources` restricts accepted sender IP addresses or ranges
- `targets` receives `[]*zapp.Payload` batches

## UDP writer

`udpWriter` is a terminal component. It serializes payload batches into ZAPP containers and writes them to a remote UDP address.

```yaml
components:
  writer:
    type: udpWriter
    network: udp
    address: 10.0.0.25:9000
    publishInterval: 10ms
    maxPacketSize: 32000
```

Important fields:

- `address` is the remote UDP endpoint
- `publishInterval` buffers and flushes payloads on an interval when set
- `maxPacketSize` limits serialized UDP packet size
