Sinks
Sinks deliver CDEvents to their final destinations.
Quick Reference
toml
[sinks.my_sink]
enabled = true
type = "folder" # db | clickhouse | http | folder | sse | kafka | nats | debug
# ... type-specific parametersAvailable Sinks
| Type | Description | Use Cases |
|---|---|---|
debug | Log events for development and testing | Development, troubleshooting, pipeline validation |
db | Store events in PostgreSQL database | Primary storage, dashboards, analytics |
clickhouse | Store events in ClickHouse | High-throughput analytics, columnar queries |
http | Forward events to HTTP endpoints | Webhooks, external APIs, integrations |
folder | Write events as files to storage | Archival, backup, batch processing |
sse | Stream events via Server-Sent Events | Real-time dashboards, monitoring |
kafka | Publish events to Kafka topics | Event streaming, Kafka-compatible brokers |
nats | Publish events to NATS subjects | Cloud-native messaging, JetStream persistent publishing |
Shared Configuration
Header Configuration
Sinks use headers differently based on their direction:
- Header Validation: Validate incoming HTTP requests (SSE sink)
- Header Authentication: Authenticate outgoing HTTP requests (HTTP sink)
→ Header Validation Guide - For incoming request validation → Header Authentication Guide - For outgoing request authentication
Default Configuration
Several sinks are included in the default configuration:
toml
[sinks.debug]
enabled = false
type = "debug"
[sinks.database]
enabled = false
type = "db"
url = "postgresql://postgres:passwd@localhost:5432/cdviz"
pool_connections_min = 1
pool_connections_max = 10To enable them, either:
- Edit configuration: Set
enabled = truein config file - Environment variable: Set
CDVIZ_COLLECTOR__SINKS__{SINK_NAME}__ENABLED="true" - Override configuration: Create a custom configuration file
Multiple Sinks
All enabled sinks receive every CDEvent simultaneously. Define as many [sinks.*] sections as needed: