Skip to content

Purpose and scope of this Document

This document provides a foundational introduction to Apache Kafka’s core concepts and their alignment with KaaS (Kafka as a Service) platforms.

  • Key Terminology Described: Topics, partitions, brokers, producers, consumers,Kafka Streams, Partition replication, offsets,Schema registry.

Note:
This is a starting guide, not a comprehensive resource. For advanced topics (e.g., security, tuning), refer to the official Confluent Developer documentation.


Key Terminology

  1. Topics
    A topic is a user-defined category or feed name where event messages are stored and published by producers and subsequently consumed by subscribers.
    ### Key Attributes of Topic

    • Event Log A topic represents a log of event messages that are continuously appended to the topic.
    • Partitions
      - Topics are divided into one or more partitions. - Each partition is an ordered, immutable sequence of records. - Partitions help distribute data across brokers in a Kafka cluster, supporting scalability and fault tolerance.

    Learn more: Confluent: What is a Kafka Topic?
    Confluent: Partitions Explained

  2. Kafka Broker
    Kafka broker is a server in the data streaming layer that stores event streams as opaque byte arrays. It handles the storage, replication, and serving of event data to clients.Brokers ensure resilience and availability by replicating data across nodes.

    Learn more: Confluent: Brokers Overview

  3. Offsets

    • An offset is a unique, monotonically increasing integer that denotes the position of an event record within its partition.

    Purpose in Streaming: - Offsets allow consumers to resume processing from their last read position after a restart or recovery. - Offsets mark processed records to prevent duplicates and data loss, ensuring processing consistency.

    Storage Mechanism: - Consumers commit their progress offsets to a dedicated Kafka topic for guaranteed durability and availability. - This topic retains only the latest state per consumer, supporting exactly-once processing scenarios.

    Operational Role: - Offsets maintain the sequential order of events within each partition for correct sequence processing. - They integrate with consumer groups to effectively manage partition assignments and balance the processing load.

  4. Producers

    • Publish events to specific topics in the Kafka cluster.
    • Determine which broker to send events to by using metadata information and a partitioning strategy.
    • Focus solely on sending data without processing it.

    Learn more: Confluent: Kafka Producers Guide

  5. Consumers

    • Read event data from Kafka topics and process it as needed.
    • Typically work as part of a consumer group to share the load, allowing for parallel processing and scalability.
    • Use offsets to keep track of which events have been processed, and coordinate with the group for assigning topic partitions.

    Learn more: Confluent: Kafka Consumers Guide

  6. Kafka Streams
    Kafka Streams is a Java API that simplifies stream processing by providing a rich set of computational primitives, such as filtering, grouping, and aggregating, allowing developers to focus on business logic rather than framework code. It efficiently handles state management and distributed processing, enabling the construction of scalable and fault-tolerant microservices that can react to real-time events while also serving other application functions, such as exposing REST APIs for user interaction.

    Learn more: Confluent: Kafka Streams Guide

  7. Partition Replication

    • Copies partitions across brokers for fault tolerance.
    • Leader: Handles read/writes. Replicas: Sync with the leader.

    Learn more: Confluent: Replication Guide

  8. Schema Registry

    • Schema Registry is an integral component of the Kafka ecosystem that manages metadata for Avro, JSON Schema, and Protobuf data formats.
    • It provides a centralized serving layer that ensures consistent data encoding and decoding across Kafka producers and consumers.
    • By enforcing schema compatibility modes—backward, forward, and full—Schema Registry facilitates seamless schema evolution, allowing producers to update schemas while ensuring consumers can still process historical data.
    • It employs versioning to manage schema updates and interfaces effectively.
    • Offers a RESTful API for schema storage and retrieval.
    • Features robust compatibility checks, schema validation, and error handling.
    • Plays a vital role in maintaining data integrity and governance within event-driven architectures and complex data pipelines.

    Learn more: Confluent: Schema Registry Quick Guide

References

For detailed tutorials and resources:
- Confluent Schema Registry Key Concepts Tutorials
- Confluent Schema Registry Documentation

Training Material

The Confluent team has developed a series of training videos and accompanying documentation to provide valuable insights. Please refer to the Training material for more information.