Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Mastering Apache Kafka: From Beginners to Advanced
Rating: 3.7 out of 5(9 ratings)
115 students

Mastering Apache Kafka: From Beginners to Advanced

Learn Apache Kafka comprehensively from fundamentals to advanced topics and practical projects in this master course.
Last updated 11/2024
English
English [Auto],

What you'll learn

  • Fundamentals of Apache Kafka and its architecture.
  • Installation and setup of Kafka and Zookeeper.
  • Creating Kafka topics, producers, and consumers.
  • Customizing producers and consumers for specific use cases.
  • Handling Kafka broker scenarios and cluster management.
  • Configuring Kafka properties for performance optimization.
  • Understanding Kafka internals like buffer memory and batch size.
  • Managing Kafka consumer groups and load balancing.
  • Implementing real-world projects using Kafka and Spark for data streaming and aggregation.
  • Troubleshooting common issues and ensuring high availability in Kafka clusters.

Course content

3 sections62 lectures9h 27m total length
  • Introduction to Apache Kafka9:13

    Explore how Apache Kafka enables end-to-end messaging and streaming with brokers, producers, consumers, topics, and Zookeeper. See its open-source nature, ELK stack compatibility for visualization, and clustering for data availability.

  • Zookeeper and Kafka Installation13:25

    Install kafka and its components by setting up zookeeper as the heart of kafka and creating a three-node cluster. Configure data and logs, zoo.cfg, myid, and start zookeeper with zkServer.cmd.

  • Zak and Kafka Installation Steps for Windows6:48

    Master the Windows installation of zookeeper for Kafka by configuring Java_HOME and launching a three-node zookeeper cluster. Troubleshoot port 2181 and config issues to bring all nodes online.

  • Creation of Topics13:03

    Set up a three-node Kafka cluster with unique broker IDs and separate log directories, then create a topic with the Kafka topics batch file using bootstrap servers 9093, 9094, 9095.

  • Console Producer and Producer Consumer9:41

    Learn how topics are partitioned into partitions, apply replication factor for high availability, and manage topics with list and describe commands.

  • Partitions and Replication Factor9:02

    Learn how Kafka clusters designate a leader per partition to manage producer messages and replicate to in-sync replicas (ISR) for high availability.

  • Implications of Kafka and ZK11:51

    Explore how Kafka and ZooKeeper handle failures, from node outages to broker downtime, through leader rebalancing, partitions, and replication for high availability.

  • Implications of Kafka and ZK Continue4:35

    Explore how kafka topic creation, partition counts, and replication factors work, including why replication cannot be changed post-creation and how to alter partitions with json-based configurations.

  • Rebalancing of Kafka Nodes6:20

    Start a producer and consumer on topic test one, publish messages, and observe how Kafka rebalances partition leaders across brokers to maintain high availability when a broker goes down.

  • Bring Down All Zak Nodes7:55

    Demonstrates how Kafka servers behave when all Zookeeper nodes go down, with ISR expanding and producers and consumers continuing to operate, even as topic creation tests report errors.

  • All Kafka Nodes6:20

    Explore how Kafka nodes rely on zookeeper to register topic metadata, handle timeouts, and maintain cluster health; learn how zookeeper failures affect topic creation, broker availability, and recovery.

  • Kafka Custom Producer Part 111:57

    Kafka custom producer part 1 teaches how to build custom producers using the Java API for Kafka, detailing required properties like bootstrap servers, key and value serializers, acks, and retries.

  • Kafka Custom Producer Part 26:48

    Develop and run a custom kafka producer that continuously sends string key/value records to a topic in an infinite loop, using producer and producer record with runtime confirmations.

  • Kafka Custom Producer Part 38:14

    Compile and run a custom Kafka producer against a demo topic, with Zookeeper and broker setup. Test end-to-end data flow by consuming produced messages with a Kafka console consumer.

  • Kafka Custom Consumer Part 111:23

    build a java kafka custom consumer by configuring bootstrap servers and string deserializers, enabling auto commit and session timeout, then subscribe to a topic with a mandatory topic name.

  • Kafka Custom Consumer Part 27:38

    Explore how a Kafka consumer reads topic data in an infinite loop using poll, holds records, formats and prints offsets, keys, and values, and imports the consumer package.

  • Kafka Custom Consumer Part 313:00

    Explore building and testing a kafka custom consumer in java, including topic subscription, group id configuration, and end-to-end producer–consumer interaction.

  • Kafka-Broker-Scenarios Part 19:15

    Explore Kafka broker and topic behavior by corrupting the leader broker's topic file and observing producer and consumer results.

  • Kafka-Broker-Scenarios Part 29:27

    Delete the leader topic file to observe behavior as producers publish and consumers consume, then explore corruption of a non-leader broker and its impact on failover and replication.

  • Kafka-Broker-Scenarios Part 312:44

    Demonstrate Kafka's durability and leader rebalancing by running a producer and consumer, simulating broker failures and topic file corruption or deletion across non-leader and leader brokers.

  • Kafka-Broker-Scenarios Part 49:38

    Explore how Kafka brokers manage leader changes and in-sync replicas during failover, preserving data integrity. See broker termination during active read-write to assess producer and consumer resilience.

  • Kafka-Producer-Scenarios Part 19:01

    Explore how multiple producers send to the same topic and verify that Kafka preserves message sequencing at the consumer, with producers posting messages in random order but consumed in order.

  • Kafka-Producer-Scenarios Part 29:01

    Kafka preserves sequencing and offsets across producer restarts, letting the same topic yield new messages from the correct offset. A custom consumer remains open, preventing re-reading and ensuring no duplication.

  • Kafka-Producer-Scenarios Part 314:53

    Explore how a Kafka producer behaves when the cluster is down, with broker failures and leader loss, and learn that at least one broker must stay up for successful publishing.

  • Buffer .Memory Property Manipulation8:25

    Tune producer buffer memory and other configurations in Apache Kafka. Manage ZooKeeper ensembles and Kafka brokers, create topics with partitions and replication factors.

  • Buffer .Memory Property Manipulation Continue9:23

    Examine how to verify topic creation and partitioning, then publish messages with a producer while tweaking producer properties such as bootstrap.servers, compression, buffer.memory, batch.size, and linger.ms.

  • Batch .Size Property Manipulation8:31

    The lecture demonstrates using producer.config to override defaults, showing how buffer.memory between the producer and topic restricts message size and how raising it from 3000 to 4500 fixes serialization errors.

  • Batch .Size Property Manipulation Continue8:28

    Experiment with batch.size and buffer.memory to see how a 4500 byte limit triggers java.lang.IllegalArgumentException when allocating 10000 bytes, then raise buffer.memory to 45000 to enable larger batches.

  • linger .MS Property Manipulation10:22

    Explore how kafka consumer properties and group.id establish consumer groups, and how offsets distribute messages among group members rather than to every consumer.

  • Group.id Property Manipulation9:58

    shows how Kafka topic is divided into partitions under a consumer group and how partition-to-consumer mapping determines which consumer reads each message.

  • Consumer Groups10:27

    Explore how linger.ms, batch.size, and buffer.memory shape producer batching and when messages posted to topics. Observe consumers reading from the beginning and the impact of gzip and snappy on delivery.

  • Impact of Broker not Available on Prod8:15

    See how broker failures affect Kafka producers and consumers. Topic test has leader broker two with replicas two and three; stopping broker two halts the producer while the consumer continues.

  • Impact of Broker not Available on Prod Continue5:52

    Explore how broker outages affect producers and consumers in Kafka when leaders go down and acks matter. Consider migration from other tools and testing negative scenarios.

  • Kafka Brokers11:47

    Learn how shutting down Zookeeper peers affects Kafka brokers and cluster communication, triggering connection reset errors and logs, and test Kafka's resilience by creating a topic after outages.

  • Kafka Brokers Continue11:44

    Understand kafka brokers and bootstrap servers on localhost: 9093, 9094, and 9095 for topic creation. See how zookeeper quorum, an odd-numbered cluster, governs topic availability.

  • Impact of Zak Instance7:49

    Analyze the impact of killing zookeeper instances on the Kafka producer and consumer, and observe message delivery on topic test as zookeeper instances are terminated.

  • Impact of Zak Instance Continue7:04

    Explore how increasing producer load affects producer and consumer synchronization in Apache Kafka, including Zookeeper failures, topic description, replicas, and leader elections after restart.

  • Load Balancing Part 18:36

    Simulate heavy load on Kafka by producing a ~20 kb message one million times and consuming it to observe broker and ZooKeeper behavior under failures.

  • Load Balancing Part 27:02

    Restart Kafka servers, compile and run the producer code, and create a topic with one partition and replication factor three to validate message delivery and load balancing.

  • Load Balancing Part 310:06

    Start a simple producer and consumer, compile and run demos, create topics, and examine how messages, keys, values, and offsets are consumed under load.

  • Load Balancing Part 49:36

    Explore load balancing part 4 in Kafka by running producer and consumer across topics, observing offsets, keys, and values, and testing broker failures to reveal data loss risks and leader failover.

  • Load Balancing Part 510:35

    Explore Kafka load balancing and fault tolerance as producers reach high throughput while brokers and leaders failover, showing how replicas maintain data integrity and consumer resilience.

Requirements

  • Basic understanding of Linux command line interface.
  • Familiarity with Java programming language.
  • Knowledge of distributed systems concepts (beneficial but not mandatory).
  • Understanding of fundamental concepts of messaging systems (e.g., queues, topics).
  • Basic knowledge of Hadoop ecosystem components (like HDFS) would be advantageous.

Description

Course Introduction: Welcome to the comprehensive course on Apache Kafka, designed to take you from a beginner to an advanced level in utilizing Kafka for scalable and efficient data streaming solutions. Whether you're new to distributed systems or looking to enhance your knowledge, this course covers everything from the basics of Kafka and Zookeeper setup to advanced topics like producer and consumer configurations, fault tolerance, and real-world project implementations. By the end of this course, you will have the skills and confidence to leverage Apache Kafka effectively in various applications, ensuring robust data handling and real-time analytics.

Section 1: Apache Kafka - Beginners to Beyond

This section provides a comprehensive introduction to Apache Kafka, covering the foundational aspects of setting up Kafka and Zookeeper, essential for managing distributed systems. Students will learn about topic creation, using both console-based producers and consumers, and delve into advanced concepts such as partitions, replication factors, and Kafka node rebalancing. The lectures also explore custom producer and consumer configurations, addressing various scenarios and performance optimizations through buffer memory, batch size, and linger time manipulations. Participants will gain insights into managing consumer groups, handling broker failures, and implementing effective load balancing strategies.

Section 2: Project on Apache Kafka - Top Trending Songs

In this project-oriented section, students will apply their Kafka knowledge to a real-world scenario of analyzing top trending songs. Starting with the installation of Kafka and Spark, participants will set up the project structure and develop Scala objects for data aggregation. The course progresses with practical demonstrations on data production using Kafka producers, consuming data, and writing data to Kafka topics. By the end, learners will be equipped with the skills to implement and optimize data streaming solutions using Apache Kafka in a project context.

Throughout this journey, you gain a deep understanding of Kafka's architecture, its role in data streaming, and practical skills in setting up, configuring, and optimizing Kafka environments. From learning essential concepts like topics, partitions, and replication to mastering advanced techniques such as managing producer and consumer performance, you will be equipped to tackle complex data streaming challenges. Keep exploring and applying Kafka's capabilities to innovate and streamline data workflows in your projects.

Who this course is for:

  • Software Developers: Those interested in learning about Apache Kafka for building real-time data pipelines and streaming applications.
  • Data Engineers: Professionals aiming to integrate Kafka into their data architecture for scalable and efficient data processing.
  • System Administrators: Individuals responsible for managing and deploying Kafka clusters in enterprise environments.
  • Big Data Professionals: Those working with Hadoop ecosystem tools and seeking to incorporate Kafka for data ingestion and processing.
  • Tech Enthusiasts: Anyone curious about distributed messaging systems and real-time data processing technologies.