TodolistProject

Kafka Documentation

Overview

Apache Kafka serves as the message broker and event streaming platform for the application.
It enables asynchronous communication between services and provides event persistence and replay capabilities.

Architecture

Key Features

Event Topics

Partitioning Strategy

Key Principle

All events are partitioned by Team ID to ensure:

Partition Keys

Event Flow

Events are published by services and consumed by other services via Kafka topics.
Events are partitioned and persisted, allowing for replay and fault-tolerant processing.

Persistence

All events are durably stored in Kafka’s internal log for replay and recovery.

Key Files

Configuration

Environment Variables:

Event Schema

All events follow a consistent JSON structure:

{
  "eventType": "task.created",
  "taskId": 123,
  "teamId": 456,
  "actorId": 789,
  "timestamp": "2025-01-20T10:30:00Z",
  "payload": { ... }
}

Benefits

Scalability

\newpage