NEW
A client library for building stream processing applications on Apache Kafka.
DESCRIPTION
Kafka Streams embeds a stream processing runtime directly into your Java application. It provides a high-level DSL and a low-level Processor API, with local state stores backed by RocksDB. Scaling is achieved via Kafka’s partitioning and consumer groups, and fault tolerance via changelogs and rebalancing. Exactly-once processing is supported through EOS mechanisms. Common uses include real-time joins, aggregations, and materialized views over Kafka topics.
ALTERNATIVE DEFINITIONS
Apache Kafka
Kafka Streams is a client library for building applications and microservices, where the input and output data are stored in Kafka clusters.
Highlights application-embedded processing and Kafka-native storage.
Confluent
Kafka Streams is a client library for building real-time applications and microservices, where the input and output data live in Apache Kafka.
Emphasizes real-time apps and microservices architecture.
RELATED TERMS
Apache Kafka ksqlDB Exactly-Once Processing State Store RocksDB Stream Processing
COMPETING TERMS
Apache Flink Structured Streaming
KNOWLEDGE AREAS
Real-time & Streaming Data Data Engineering Platform & Tooling Software Engineering
TARGET AUDIENCE
Software Developer Data Engineer MLOps Engineer Solution Architect
EXTERNAL SOURCES
- Wikipedia - Apache Kafka
- Apache Kafka - Developer guide and APIs
- Confluent - Architecture and design details
TOP QUESTIONS
When should I choose Kafka Streams over a cluster framework?
Use Kafka Streams for embedded processing in JVM applications with Kafka-only dependencies. Choose Flink or Spark for cross-system sources, complex windowing, or cluster-wide resource management.
Category: Guidance
How does Kafka Streams achieve fault tolerance?
It backs local state stores with Kafka changelog topics and replays on failures. Consumer group rebalancing redistributes tasks across instances.
Category: Architecture
What are state stores in Kafka Streams?
State stores persist local state for joins and aggregations, typically using RocksDB. They support interactive queries to expose materialized state.
Category: Concept
Does Kafka Streams support exactly-once semantics?
Yes, via EOS (exactly-once semantics) that use idempotent producers and transactional writes to Kafka.
Category: Guarantees
How do I scale a Kafka Streams application?
Scale horizontally by running more instances. Parallelism matches the number of partitions in input topics.
Category: Operations
What languages are supported by Kafka Streams?
Kafka Streams is a Java library with Kotlin compatibility. For non-JVM languages, use Kafka clients and alternative stream processors.
Category: Capabilities
How are joins implemented in Kafka Streams?
Joins use co-partitioned topics and local state stores with changelogs. Windowed joins handle temporal relationships between streams.
Category: How-to
What are common mistakes with Kafka Streams deployments?
Insufficient partitions limit scalability, and misconfigured standby replicas reduce resilience. Ignoring EOS settings can compromise processing guarantees.
Category: Mistakes
How does Kafka Streams compare to ksqlDB?
Kafka Streams is a Java library; ksqlDB provides a SQL abstraction and server for streaming queries. They can complement different developer preferences.
Category: Comparison