Professional Documents
Culture Documents
Kafka Streams _ Part I. Kafka Streams is a Powerful Library for… _ by Kamini Kamal _ Medium
Kafka Streams _ Part I. Kafka Streams is a Powerful Library for… _ by Kamini Kamal _ Medium
Kafka Streams _ Part I. Kafka Streams is a Powerful Library for… _ by Kamini Kamal _ Medium
Search
Listen
Be part of a better internet.
Share
Free
Kafka Connectors
Sign up for free
https://medium.com/@kamini.velvet/kafka-streams-part-i-373a5e09a539 1/12
11/7/24, 21:25 Kafka Streams | Part I. Kafka Streams is a powerful library for… | by Kamini Kamal | Medium
3. Stateful Processing: Kafka Streams allows you to maintain and update the state
during stream processing. It provides built-in support for state stores, which are
key-value stores that can be queried and updated within a processing topology.
Stateful operations enable advanced stream processing tasks such as joins,
aggregations, and anomaly detection.
9. Developer-Friendly APIs: Kafka Streams provides high-level DSL and APIs that
are designed to be developer-friendly and easy to use. It offers a functional
programming model with operators and fluent API syntax, making it accessible
https://medium.com/@kamini.velvet/kafka-streams-part-i-373a5e09a539 2/12
11/7/24, 21:25 Kafka Streams | Part I. Kafka Streams is a powerful library for… | by Kamini Kamal | Medium
Kafka Streams is a versatile and robust stream processing library that allows you to
build scalable, fault-tolerant, and real-time applications for processing continuous
streams of data. Its features empower developers to implement sophisticated stream
processing tasks, enabling real-time analytics, data transformations, event-driven
architectures, and more.
BeStreams
In Apache Kafka’s part oflibrary,
a better internet.
the values of a KStream are not stored in
Get 20%
Kafka itself. Instead, off membership
the values fortransformed
are processed and a limited in-memory
time. within
the stream processing application.
Free
When you define a KStream in your Kafka Streams application, it represents an
abstraction over the input topic(s) from which the stream is consumed. The stream
Distraction-free reading. No ads.
processing operations defined on the KStream, such as filtering, mapping,
Organize
aggregating, or joining, are your to
applied knowledge with lists
the records asand highlights.
they are consumed.
Tell your story. Find your audience.
The processed records and intermediate results are stored in memory within the
stream processing application. The Kafka Streams library provides mechanisms to
manage and maintain this in-memory state across multiple instances or threads of
the application. The state can include windowed state, key-value stores, or any other
stateful data structures used by the application for stream processing.
However, the input and output records of the KStream can be stored in Kafka topics
if desired. The processed records can be written to new topics using the Kafka
https://medium.com/@kamini.velvet/kafka-streams-part-i-373a5e09a539 3/12
11/7/24, 21:25 Kafka Streams | Part I. Kafka Streams is a powerful library for… | by Kamini Kamal | Medium
producer, and the results can be consumed from these output topics by other
applications or downstream processes.
So, while Kafka is the underlying messaging system used for input and output
topics, the actual values of a KStream in the Kafka Streams library are stored and
processed in-memory within the stream processing application.
Tell your
2. Stateful Processing and story. FindTopics:
Changelog your audience.
Kafka Streams maintains the
necessary state information for stream processing. Intermediate results,
aggregations, and stateful operations are stored in internal state stores. These
state stores are also backed by Kafka topics called changelog topics, which
record all updates to the state stores. This allows the state to be reconstructed in
case of failures or application restarts.
Membership Get 20% off
3. Offset Management: Kafka Streams tracks the offsets of consumed records and
periodically commits them to Kafka. This enables the library to resume
Read member-only stories
processing from the last committed offset in case of failures or restarts. It
Support writers
ensures that the application you read
can pick up most
from where it left off without
reprocessing previously
Earn processed records.
money for your writing
4. Application Rebalancing:
Listen Kafka
to audioStreams
narrations leverages Kafka’s consumer group
https://medium.com/@kamini.velvet/kafka-streams-part-i-373a5e09a539 4/12
11/7/24, 21:25 Kafka Streams | Part I. Kafka Streams is a powerful library for… | by Kamini Kamal | Medium
Kafka Streams
GetKafka
20% offKafka
membership
Connect
for a limited time.
Free
Follow
Software Engineer
Read member-only stories
https://medium.com/@kamini.velvet/kafka-streams-part-i-373a5e09a539 5/12
11/7/24, 21:25 Kafka Streams | Part I. Kafka Streams is a powerful library for… | by Kamini Kamal | Medium
Free
KStream vs KTable
KStream and KTable are two important concepts in Apache Kafka’s Streams library, which is a
Distraction-free reading. No ads.
powerful framework for building real-time…
Organize your knowledge with lists and highlights.
Jul 30, 2023 91
Tell your story. Find your audience.
https://medium.com/@kamini.velvet/kafka-streams-part-i-373a5e09a539 6/12
11/7/24, 21:25 Kafka Streams | Part I. Kafka Streams is a powerful library for… | by Kamini Kamal | Medium
Free
https://medium.com/@kamini.velvet/kafka-streams-part-i-373a5e09a539 7/12
11/7/24, 21:25 Kafka Streams | Part I. Kafka Streams is a powerful library for… | by Kamini Kamal | Medium
https://medium.com/@kamini.velvet/kafka-streams-part-i-373a5e09a539 8/12
11/7/24, 21:25 Kafka Streams | Part I. Kafka Streams is a powerful library for… | by Kamini Kamal | Medium
Free
Kafka Streaming — Part 1
Overview of Kafka
Distraction-free reading. No ads.
Lists
Staff Picks
685 stories · 1126 saves
Membership
Stories to Help You Level-Up at Work
Get 20% off
ProductivityEarn
101 money for your writing
20 stories · 2015 saves
Listen to audio narrations
https://medium.com/@kamini.velvet/kafka-streams-part-i-373a5e09a539 9/12
11/7/24, 21:25 Kafka Streams | Part I. Kafka Streams is a powerful library for… | by Kamini Kamal | Medium
Free
Flink vs. Kafka: A Quick Guide to Stream Processing Engines
The surge in data generation, fueled by IoT and digitization, has led to the challenge of
handling massive datasets, Distraction-free
commonly known reading. No ads.
as big…
Organize your knowledge with lists and highlights.
Jan 22 79
Tell your story. Find your audience.
https://medium.com/@kamini.velvet/kafka-streams-part-i-373a5e09a539 10/12
11/7/24, 21:25 Kafka Streams | Part I. Kafka Streams is a powerful library for… | by Kamini Kamal | Medium
Mar 16 563 6
Free
SPOUD
Distraction-free reading. No ads.
Jan 29 3
https://medium.com/@kamini.velvet/kafka-streams-part-i-373a5e09a539 11/12
11/7/24, 21:25 Kafka Streams | Part I. Kafka Streams is a powerful library for… | by Kamini Kamal | Medium
Free
https://medium.com/@kamini.velvet/kafka-streams-part-i-373a5e09a539 12/12