Kafka

Apache Kafka is a popular opensource distributed event streaming platform. This page contains core concepts, best practices, and how-to guides with code examples.

Beginner Intermediate Advanced

Kafka Fundamentals

14 articles
Apache Kafka: Introduction, Architecture & Core Concepts

What is Kafka, why it exists, brokers, topics, partitions, offsets, and how producers and consumers fit together.

Kafka Topics and Partitions: How Data is Organized

Topic creation, partition count, replication factor, partition assignment strategies, and retention policies.

Kafka Producers: Publishing Messages to Kafka

ProducerConfig, key serializers, acks, retries, idempotent producers, batch settings, and compression.

Kafka Consumers & Consumer Groups: Reading Messages from Kafka

ConsumerConfig, poll loop, offset commits, consumer group rebalancing, and at-least-once vs exactly-once semantics.

Kafka Offsets & Offset Management

How offsets work, auto vs manual commit, offset reset strategies, and seeking to specific offsets.

Kafka Message Serialization

String, JSON with Jackson, custom serializers, and Avro with Schema Registry.

Kafka Streams: Stream Processing

Stream processing with Kafka Streams: KStream, KTable, stateless and stateful operations, and windowing.

Kafka Connect: Data Pipelines

Kafka Connect for building data pipelines: source and sink connectors, standalone vs distributed mode.

Kafka Producer & Consumer Configuration

Essential Kafka producer and consumer configuration: acks, retries, batching, compression, and tuning.

Kafka Exactly-Once Semantics & Transactions

Kafka exactly-once delivery: idempotent producers, transactional APIs, and the read-process-write pattern.

Kafka Schema Registry & Avro Serialization

Define Avro schemas, register with Schema Registry, and produce/consume strongly typed messages with schema evolution.

Kafka Security: SSL, SASL & ACL Authorization

Secure Kafka with SSL/TLS encryption, SASL/PLAIN and SCRAM authentication, and ACL-based topic authorization.

Consumer Group Rebalancing & Strategies

Rebalance protocols, CooperativeStickyAssignor, static group membership, rebalance listeners, and avoiding stop-the-world rebalances.

Kafka Performance Tuning & Monitoring

Optimize batch.size, linger.ms, compression, consumer fetch settings, JMX metrics, and consumer lag monitoring for production.

Kafka Advanced

5 articles

Production & Operations

5 articles