Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

Kafka Ecosystem

The Apache Kafka platform consists of multiple components that work together to provide a complete event streaming infrastructure.


Modern Kafka deployments typically include multiple components beyond the core broker cluster. Understanding the role of each component clarifies architectural decisions and deployment patterns.

Kafka platform components with data sources, sinks, and clients

ComponentPurposeDeployment
Kafka BrokersDistributed commit log storage and servingCluster of 3+ nodes
Schema RegistrySchema management and compatibility enforcementSeparate service
Kafka ConnectData integration framework with 200+ connectorsDistributed workers
Kafka StreamsStream processing libraryEmbedded in applications

Kafka brokers form the core of the platform: a distributed cluster that stores and serves event streams.

ResponsibilityDescription
Message storagePersist messages to disk in log segments
ReplicationMaintain copies across brokers for fault tolerance
Leader electionCoordinate partition leadership
Client protocolHandle produce and fetch requests
Cluster coordinationParticipate in KRaft metadata management and broker registration

Kafka 4.x uses KRaft (Kafka Raft), Kafka’s built-in metadata consensus protocol. ZooKeeper mode was removed in Kafka 4.0. The comparison below is relevant when planning an upgrade or migration from Kafka 3.x; it does not describe two deployment choices available in Kafka 4.x.

ZooKeeper mode compared with KRaft mode

AspectZooKeeper ModeKRaft Mode
External dependencyRequires ZooKeeper clusterSelf-contained
Metadata storageSplit between ZK and brokersUnified in Kafka
Operational complexityTwo systems to manageSingle system
Recovery timeSlower (ZK sync required)Faster failover
Scale characteristicsLower metadata scalability and slower controller recoveryDesigned for larger metadata sets and faster controller failover
Version supportKafka 3.x and earlier; removed in 4.0Production-ready in 3.3; required in 4.x

KRaft mode is the required deployment model for Kafka 4.x. A ZooKeeper-based cluster must migrate to KRaft before upgrading to Kafka 4.x.


Schema Registry provides centralized schema management for Kafka data, ensuring producers and consumers agree on data formats.

Without schema management:

  • Producers can change data format without warning
  • Consumers fail when they encounter unexpected formats
  • Schema evolution becomes dangerous
  • Documentation becomes the only contract (and quickly becomes stale)

Producer and consumer behaviour without and with Schema Registry

FeatureDescription
Schema storageSchemas stored in a Kafka topic (_schemas)
Compatibility checkingValidates new schemas against compatibility rules
Schema evolutionSupports backward, forward, and full compatibility
Multiple formatsAvro, Protobuf, JSON Schema
Subject managementSchemas organized by subject (typically topic-based)
ModeRuleSafe Changes
BACKWARDNew schema can read old dataAdd optional fields, remove fields
FORWARDOld schema can read new dataRemove optional fields, add fields
FULLBoth backward and forwardAdd/remove optional fields only
NONENo checkingAny change (dangerous)

Schema Registry is critical for production deployments where multiple teams produce and consume data independently.

→ Schema Registry Guide


Kafka Connect is a framework for streaming data between Kafka and external systems. It is the primary integration mechanism for most Kafka deployments.

Without ConnectWith Connect
Write custom producer/consumer for each systemUse pre-built connectors
Implement offset tracking, error handling, retry logicFramework handles operational concerns
Build and maintain integration infrastructureFocus on configuration
Different code for each data source/sinkConsistent operational model

Kafka Connect cluster with tasks distributed across workers

TypeDirectionExample Use Cases
Source connectorsExternal → KafkaDatabase CDC, file ingestion, API polling
Sink connectorsKafka → ExternalData lake writes, search indexing, notifications

200+ production-grade connectors are available:

CategoryExamples
Event SourcesHTTP/REST, MQTT, File/Syslog, JMS/MQ
Cloud Storage SinksS3, GCS, Azure Blob, HDFS
Database SinksCassandra, Elasticsearch, OpenSearch
Data Warehouse SinksSnowflake, BigQuery, Redshift

Kafka Connect is often the most valuable component of a Kafka deployment—it eliminates thousands of lines of integration code.

→ Kafka Connect Guide


Kafka Streams is a client library for building stream processing applications. Unlike Connect, Streams is embedded in applications rather than deployed as a separate cluster.

AspectDescription
DeploymentLibrary embedded in application (JAR dependency)
ScalingAdd application instances to scale
State managementLocal state stores with changelog topics for recovery
Processing semanticsExactly-once processing supported
Fault toleranceAutomatic state recovery from changelog topics

Kafka Streams supports two rebalance protocols:

  • The classic protocol performs task assignment in a Streams client leader.
  • The Streams Rebalance Protocol (group.protocol=streams) performs task assignment through the broker. Its core feature set is production-ready in Kafka 4.2 and provides faster, more observable rebalances. Kafka 4.4 adds static membership and broker-side custom task assignors for streams groups.

Kafka 4.4 also adds optional transactional state stores for exactly-once applications. With enable.transactional.statestores=true, local state-store updates participate in the processing transaction so recovery can roll back uncommitted changes instead of rebuilding the entire store.

Use CaseWhy Streams
Stateful transformationsAggregations, joins, windowing
Application-embedded processingNo separate cluster to manage
Microservice event processingNatural fit for event-driven services
Real-time enrichmentStream-table joins for lookups
AspectKafka StreamsKafka Connect
PurposeData processing and transformationData movement between systems
DeploymentApplication librarySeparate worker cluster
Custom logicFull programming modelConfiguration + SMTs
StateBuilt-in state storesStateless (connector-dependent)
ScalingAdd application instancesAdd workers

Kafka Streams application with state store and changelog topic → Kafka Streams Guide


RequirementRecommended Component
Stream events from APIs to KafkaKafka Connect + HTTP/MQTT Source
Move data from Kafka to data lakeKafka Connect + S3/GCS connector
Transform and enrich eventsKafka Streams
Custom application logicKafka Streams or custom consumer
Schema enforcementSchema Registry
Real-time dashboardsKafka Streams + external visualization

Production Kafka architecture from source systems to downstream systems

ComponentStatus in Kafka 4.x
Kafka brokers and controllersKRaft only
Kafka ConnectIncluded with Apache Kafka; connector compatibility is vendor-specific
Kafka StreamsIncluded as a client library; application and broker compatibility must be checked during upgrades
Schema RegistrySeparate ecosystem service; compatibility depends on the selected implementation