Big Data

Apache Kafka

Design and run streaming platforms with Kafka 4 in KRaft mode: a 3-node cluster in Docker, Python producers and consumers, exactly-once, Schema Registry, Kafka Connect with Debezium, ksqlDB, security, monitoring and Kafka in the cloud. 20 verified labs.

Intermediate · 20 hours · 20 lessons · Course language: Spanish and English

A hands-on Apache Kafka 4.4 course, from zero to production. You set up Docker on Windows (WSL 2), macOS (Apple Silicon and Intel) or Linux and start your first broker in KRaft mode, without ZooKeeper. You build a 3-node cluster with docker compose and master topics, partitions, offsets, replication, ISR, retention and compaction, bringing brokers down to watch the cluster recover. You write producers and consumers in Python with the official client: keys, acks, idempotence, batching and compression; consumer groups, rebalances, commits and the new group protocol of Kafka 4. You achieve exactly-once with transactions, define data contracts with Schema Registry in Avro and Protobuf, and move data without code using Kafka Connect: PostgreSQL CDC with Debezium and a JDBC sink with a dead letter queue. You process streams with ksqlDB and statefully in Python (Quix Streams), secure the cluster with TLS, SASL/SCRAM and ACLs, and monitor it with Prometheus and Grafana, including consumer lag. You get to know Confluent Cloud, Amazon MSK and Azure Event Hubs with their local equivalents, and finish with an event-driven final project. Every command is explained and every result is real. The first 3 classes are free. The lessons, quizzes and videos are in English; the lab files keep their original Spanish names, and every lesson explains them.

What you will learn

  • Run and operate a 3-node Kafka 4 cluster in KRaft mode with Docker, on Windows, macOS or Linux
  • Design topics: partitions, keys, replication, ISR, retention and compaction
  • Write reliable producers and consumers in Python: acks, idempotence, batching, groups and commits
  • Achieve exactly-once with transactions and understand delivery semantics
  • Define and evolve data contracts with Schema Registry in Avro and Protobuf
  • Integrate databases without code using Kafka Connect: CDC with Debezium and JDBC sinks
  • Process streams with ksqlDB and statefully in Python, with time windows
  • Secure the cluster with TLS, SASL/SCRAM and ACLs, and monitor it with Prometheus and Grafana

Skills

Apache Kafka, KRaft, Docker Compose, Python, Producers and consumers, Exactly-once, Schema Registry, Avro and Protobuf, Kafka Connect, Debezium (CDC), ksqlDB, Security (TLS, SASL, ACLs), Prometheus and Grafana

Program

Module 1: First steps (free classes)

What Kafka is, Docker on your system, a KRaft broker and a 3-node cluster.

Project: A 3-node Kafka cluster in docker compose, with a KRaft quorum and a replicated topic.

  1. What Kafka is and your Docker setup: Events, brokers and topics; Docker on Windows (WSL 2), macOS and Linux, and your first Kafka 4 broker.
  2. Your first KRaft broker with docker compose: KRaft without ZooKeeper, listeners, volumes and healthchecks; producing and consuming keyed events from the console.
  3. A 3-node cluster: The controller quorum, replication factor, and leaders and replicas spread across brokers.

Module 2: Topics and storage

Partitions, keys and offsets; replication, ISR and failures; retention and compaction.

Project: A cluster that survives a broker failure without losing data.

  1. Topics, partitions, keys and offsets: How a key picks its partition, ordering per partition, offsets and segments on disk.
  2. Replication, ISR and broker failures: Leaders and followers, ISR, min.insync.replicas, acks=all and leader election on failure.
  3. Retention, compaction and topic configuration: retention.ms, deleting records, compacted topics, tombstones and dynamic configuration.

Module 3: Producers and consumers in Python

The official client, acks, idempotence, batching and compression, groups, rebalances and commits.

Project: An order producer and a billing service with manual commits.

  1. Your first producer in Python: The confluent-kafka client in a container, keys, headers, delivery reports and errors.
  2. Reliable and fast producers: acks, batching with linger.ms, zstd compression and idempotence, measured on your own cluster.
  3. Consumers and consumer groups: group.id, partition assignment, committed offsets, lag and resetting offsets.
  4. Rebalances, commits and the new group protocol: Manual commits and at-least-once, eager, cooperative and KIP-848 rebalancing.

Module 4: Guarantees and data contracts

Delivery semantics, transactions and exactly-once, Schema Registry with Avro and Protobuf.

Project: An exactly-once order validator with versioned schemas.

  1. Delivery semantics and transactions: At most, at least and exactly once; transactions, read_committed and consume-transform-produce.
  2. Schema Registry with Avro and Protobuf: Data contracts, BACKWARD compatibility, schema evolution and Protobuf.

Module 5: Integration with Kafka Connect

Source and sink connectors, SMTs and dead letter queues, and PostgreSQL CDC with Debezium.

Project: A real-time replica of a database, from PostgreSQL to Kafka and back.

  1. Kafka Connect: connectors, SMTs and dead letter queues: Workers and connectors, the REST API, a JDBC sink to PostgreSQL, transformations and a DLQ.
  2. CDC with Debezium: from PostgreSQL to Kafka and back: Change capture from the WAL, before/after events, tombstones and a replica with a sink.

Module 6: Stream processing

ksqlDB (streams, tables, windows) and stateful processing in Python with Quix Streams.

Project: Running and hourly sales computed in real time.

  1. Stream processing with ksqlDB: Streams and tables, filters, aggregations, windows, and pull and push queries.
  2. Stateful processing in Python: Quix Streams and the Kafka Streams concepts: state, changelog, recovery and windows.

Module 7: Production and cloud

TLS, SASL/SCRAM and ACLs, monitoring with Prometheus and Grafana, managed Kafka in the cloud and a final project.

Project: An event-driven order platform: Avro, exactly-once, CDC and a sink to PostgreSQL.

  1. Security: TLS, SASL/SCRAM and ACLs: Encryption with certificates, users with SCRAM and least-privilege permissions with ACLs.
  2. Monitoring: JMX, Prometheus, Grafana and lag: JMX exporter, one-by-one restarts, PromQL, alerts and a Grafana dashboard.
  3. Managed Kafka in the cloud: Confluent Cloud, Amazon MSK and Azure Event Hubs, and switching from local to the cloud with a profile.
  4. Final project: an event-driven order platform: Avro, exactly-once, CDC with Debezium and a sink to PostgreSQL, together in one system.

Prerequisites

  • A Windows 10/11, macOS or Linux computer with 8 GB of RAM (16 GB is more comfortable)
  • Docker Desktop (or Docker Engine on Linux): the first class walks you through each system step by step
  • Basic use of the terminal and the ability to read basic Python. You don't need a cloud account

Next courses

  • Intermediate Docker: Real Production Cases · Intermediate · 20 hours
    Build fast, small and secure images, organize Compose for teams, run networks, data and logs the way production does, and automate with CI/CD. 20 labs with real cases, based on the official documentation.
  • Monitoring with Prometheus and Grafana · Beginner · 20 hours
    Measure your servers and applications, build professional dashboards and get alerts before your users notice a problem. 20 labs with Prometheus 3 and Grafana 13, based on the official documentation.

See all courses