> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eventdbx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TCP Plugin

> Stream events over raw TCP sockets when latency matters most.

The TCP plugin writes JSON envelopes over a TCP socket (one connection per delivery). It is the simplest low-latency emitter when you control the consumer. Configuration lives at the system data root (for example `~/.eventdbx/plugins.json`).

## Message format

Configure via CLI:

```bash theme={null}
dbx plugin config tcp --name risk-stream --host risk-broker.internal --port 7075 --payload event-only
```

One JSON line per delivery:

```json theme={null}
{"event": {...}, "state": {...}, "schema": {...}}
```

Keys are omitted when `payload_mode` excludes them.

## Reliability

* One connection per delivery; retries are handled by the EventDBX plugin queue.
* Keep the consumer fast and fail-closed; slow or unreachable sockets surface as retries in `dbx queue`.

## Monitoring

* Watch plugin logs for write failures; use `dbx plugin test <name>` to send a sample envelope.
