Skip to content

Kafka Integration

Ahmed edited this page Mar 16, 2026 · 2 revisions

Kafka Integration (Live Tail)

EventLens optionally connects to Kafka to stream live events directly into the UI dashboard as they occur.

Configuration

In your eventlens.yaml, configure the bootstrap servers and topic:

kafka:
  bootstrap-servers: your-kafka:9092
  topic: your-events-topic

Consistency Model

  • Postgres (via eventlens_events view) is the system of record.
  • Kafka is used strictly for live streaming.
  • Your application is responsible for the dual-write: Write to Postgres, then publish a corresponding Kafka message. EventLens does not reconcile differences.

Recommended Message JSON Shape

Ensure the JSON fields match your configured columns:

{
  "event_id": 123,
  "aggregate_id": "1ffe55a0-08fa-4109-bec9-55c35dd879a4",
  "aggregate_type": "ORDER",
  "sequence_number": 3,
  "event_type": "ORDER_COMPLETED",
  "payload": {
    "aggregateId": "1ffe55a0-08fa-4109-bec9-55c35dd879a4",
    "version": 3,
    "createdDate": "2026-03-14T14:50:50.115861751Z",
    "eventType": "ORDER_COMPLETED"
  },
  "metadata": {},
  "timestamp": 1773499850.115862,
  "global_position": 123
}

Return Home

Clone this wiki locally