← All projects

Learning Kafka

Local Kafka pipeline that simulates clickstream data and processes it through Bronze and Silver layers.

View on GitHub

Overview

I built a local Kafka pipeline to learn streaming data patterns. It simulates clickstream events, ingests them into Redpanda (a Kafka-compatible broker), and processes them through a Bronze/Silver architecture. Raw events get written to JSONL files, then a batch job transforms them into Parquet for analytics queries with DuckDB. Everything runs locally with Docker, so I could experiment without cloud costs.

How it works

  • ShadowTraffic generates synthetic clickstream events and sends them to a Kafka topic
  • Redpanda broker with Console UI for monitoring
  • Bronze layer consumer writes raw JSONL files with Kafka metadata and timestamps
  • Files rotate every minute to keep sizes manageable
  • Manual offset commits only happen after successful writes
  • Silver layer batch job processes records incrementally using partition/offset checkpoints
  • Safe to re-run without creating duplicates
  • DuckDB queries Parquet files for analytics like event counts and top pages
  • Runs entirely locally with Docker, no cloud services needed