SlideShare a Scribd company logo
Kafka Streams
Distributed, fault tolerant stream processing
Kafka Streams: Stream-table duality
● Almost every stream
processing needs database
● Stream of key-value
messages can be considered
as changelog of virtual two-
column table
● Also changelog of this table
can produce the same
original stream
Kafka Streams Concepts: Ktable and Kstream
● In KStream each data record represents a self-contained datum in unbounded
dataset
("alice", 1) --> ("alice", 3): sum for key “alice” will return 4
● In KTable each data record represents an update in changelog stream
("alice", 1) --> ("alice", 3): sum for key “alice” will return 3
● KTable provides an ability to look up current values of data records by keys,
which is available through join operations.
Kafka Streams: Stateless transformations
● Both KStream and KTable are created from Kafka topic
● Following standard stateless transformations are available:
- Branch (split)
- Filter
- Map
- Flatmap
- GroupBy
- Peek etc….
● All transformation methods can be chained together to compose a complex
processor topology
Kafka Streams: Time
Kafka Streams supports the following notions of time:
● Event time: The point in time when an event or data record occurred, created
“by the source”
● Processing time: The point in time when the event or data record happens to
be processed by the stream processing application
● Ingestion-time: The point in time when an event or data record is stored in a
topic partition by a Kafka broker.
Kafka Streams: Aggregation and Join
● An aggregation operation takes one input stream or table, and yields a new
table by combining multiple input records into a single output record. Examples
of aggregations are computing counts or sum.
● Aggregation API has standard implementations ready like count and reduce.
● A join operation merges two input streams and/or tables based on the keys of
their data records, and yields a new stream/table
● Records can be joined only by key.
● Logic depends on type of sources, so KStream-to-KStream, KStream-to-KTable
and KTable-to-KTable join are slightly different operations.
Kafka Streams: Windowing
Usecase: Price alert feature
Usecase: Price alert feature
Price alert feature: Classic
● Save user requests for price alerts to database
● Pay attention to flight offers add/update date
● Create complicated database queries to join user
requests and new offers according to date, source
and destination
● Use scheduler for publishing price alerts
Price alert feature: Event driven!
Price alert feature: Kafka Streams solution
Anatoly Tikhonov anatoly.tihonov@mentory.io https://www.linkedin.com/in/anatoly-tikhonov-
8617a483/
THANK YOU!

More Related Content

PPTX
Apache Kafka Streams
PPTX
Distributed Kafka Architecture Taboola Scale
PDF
Kafka Tiered Storage | Satish Duggana and Sriharsha Chintalapani, Uber
PDF
Kafka zero to hero
PDF
How Kafka and MemSQL Became the Dynamic Duo (Sarung Tripathi, MemSQL) Kafka S...
PDF
Analyzing Petabyte Scale Financial Data with Apache Pinot and Apache Kafka | ...
PDF
How to use Standard SQL over Kafka: From the basics to advanced use cases | F...
PDF
Performance Tuning RocksDB for Kafka Streams’ State Stores
Apache Kafka Streams
Distributed Kafka Architecture Taboola Scale
Kafka Tiered Storage | Satish Duggana and Sriharsha Chintalapani, Uber
Kafka zero to hero
How Kafka and MemSQL Became the Dynamic Duo (Sarung Tripathi, MemSQL) Kafka S...
Analyzing Petabyte Scale Financial Data with Apache Pinot and Apache Kafka | ...
How to use Standard SQL over Kafka: From the basics to advanced use cases | F...
Performance Tuning RocksDB for Kafka Streams’ State Stores

What's hot (20)

PDF
It's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, Shopify
PDF
Utilizing Kafka Connect to Integrate Classic Monoliths into Modern Microservi...
PPTX
Kafka Summit NYC 2017 Hanging Out with Your Past Self in VR
PDF
Kafka Summit NYC 2017 - Building Advanced Streaming Applications using the La...
PDF
Bravo Six, Going Realtime. Transitioning Activision Data Pipeline to Streamin...
PDF
Tradeoffs in Distributed Systems Design: Is Kafka The Best? (Ben Stopford and...
PDF
Via Varejo taking data from legacy to a new world at Brazil Black Friday (Mar...
PDF
Real-time Data Streaming from Oracle to Apache Kafka
PDF
Flink Forward San Francisco 2019: Building production Flink jobs with Airstre...
PDF
Hadoop summit - Scaling Uber’s Real-Time Infra for Trillion Events per Day
PDF
Kafka Summit SF 2017 - Query the Application, Not a Database: “Interactive Qu...
PDF
KSQL Intro
PPTX
Capture the Streams of Database Changes
PDF
Securing the Message Bus with Kafka Streams | Paul Otto and Ryan Salcido, Raf...
PDF
Kafka Summit NYC 2017 Introduction to Kafka Streams with a Real-life Example
PDF
Administrative techniques to reduce Kafka costs | Anna Kepler, Viasat
PDF
Developing a custom Kafka connector? Make it shine! | Igor Buzatović, Porsche...
PDF
Easily Build a Smart Pulsar Stream Processor_Simon Crosby
PPTX
Portable Streaming Pipelines with Apache Beam
PDF
Putting Kafka Together with the Best of Google Cloud Platform
It's Time To Stop Using Lambda Architecture | Yaroslav Tkachenko, Shopify
Utilizing Kafka Connect to Integrate Classic Monoliths into Modern Microservi...
Kafka Summit NYC 2017 Hanging Out with Your Past Self in VR
Kafka Summit NYC 2017 - Building Advanced Streaming Applications using the La...
Bravo Six, Going Realtime. Transitioning Activision Data Pipeline to Streamin...
Tradeoffs in Distributed Systems Design: Is Kafka The Best? (Ben Stopford and...
Via Varejo taking data from legacy to a new world at Brazil Black Friday (Mar...
Real-time Data Streaming from Oracle to Apache Kafka
Flink Forward San Francisco 2019: Building production Flink jobs with Airstre...
Hadoop summit - Scaling Uber’s Real-Time Infra for Trillion Events per Day
Kafka Summit SF 2017 - Query the Application, Not a Database: “Interactive Qu...
KSQL Intro
Capture the Streams of Database Changes
Securing the Message Bus with Kafka Streams | Paul Otto and Ryan Salcido, Raf...
Kafka Summit NYC 2017 Introduction to Kafka Streams with a Real-life Example
Administrative techniques to reduce Kafka costs | Anna Kepler, Viasat
Developing a custom Kafka connector? Make it shine! | Igor Buzatović, Porsche...
Easily Build a Smart Pulsar Stream Processor_Simon Crosby
Portable Streaming Pipelines with Apache Beam
Putting Kafka Together with the Best of Google Cloud Platform
Ad

Similar to Apache Kafka Streams Use Case (20)

ODP
Stream processing using Kafka
PDF
Kafka Streams: the easiest way to start with stream processing
PPTX
Kafka streams distilled
PPTX
Kafka Streams for Java enthusiasts
PDF
ksqlDB Workshop
PDF
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...
PDF
Kafka Streams
PDF
Data Streaming in Kafka
PDF
Kafka 102: Streams and Tables All the Way Down | Kafka Summit San Francisco 2019
PDF
Consistency and Completeness: Rethinking Distributed Stream Processing in Apa...
PDF
What every software engineer should know about streams and tables in kafka ...
PPTX
Real time data pipline with kafka streams
PPTX
Exactly-once Stream Processing with Kafka Streams
PPTX
Stateful streaming and the challenge of state
PDF
Introduction to Kafka Streams - Knolx.pdf
PDF
Apache Kafka, and the Rise of Stream Processing
PDF
Building Ebay using Serverless and stream processing - Big Data London Novemb...
PDF
Performance Analysis and Optimizations for Kafka Streams Applications
PDF
Performance Analysis and Optimizations for Kafka Streams Applications (Guozha...
PDF
Kafka Streams - From the Ground Up to the Cloud
Stream processing using Kafka
Kafka Streams: the easiest way to start with stream processing
Kafka streams distilled
Kafka Streams for Java enthusiasts
ksqlDB Workshop
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...
Kafka Streams
Data Streaming in Kafka
Kafka 102: Streams and Tables All the Way Down | Kafka Summit San Francisco 2019
Consistency and Completeness: Rethinking Distributed Stream Processing in Apa...
What every software engineer should know about streams and tables in kafka ...
Real time data pipline with kafka streams
Exactly-once Stream Processing with Kafka Streams
Stateful streaming and the challenge of state
Introduction to Kafka Streams - Knolx.pdf
Apache Kafka, and the Rise of Stream Processing
Building Ebay using Serverless and stream processing - Big Data London Novemb...
Performance Analysis and Optimizations for Kafka Streams Applications
Performance Analysis and Optimizations for Kafka Streams Applications (Guozha...
Kafka Streams - From the Ground Up to the Cloud
Ad

Recently uploaded (20)

PDF
medical staffing services at VALiNTRY
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
ai tools demonstartion for schools and inter college
PPTX
L1 - Introduction to python Backend.pptx
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
System and Network Administraation Chapter 3
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Understanding Forklifts - TECH EHS Solution
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Nekopoi APK 2025 free lastest update
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
medical staffing services at VALiNTRY
Which alternative to Crystal Reports is best for small or large businesses.pdf
Reimagine Home Health with the Power of Agentic AI​
ai tools demonstartion for schools and inter college
L1 - Introduction to python Backend.pptx
Softaken Excel to vCard Converter Software.pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Designing Intelligence for the Shop Floor.pdf
System and Network Administraation Chapter 3
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Computer Software and OS of computer science of grade 11.pptx
Understanding Forklifts - TECH EHS Solution
2025 Textile ERP Trends: SAP, Odoo & Oracle
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Nekopoi APK 2025 free lastest update
Digital Systems & Binary Numbers (comprehensive )
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
How to Choose the Right IT Partner for Your Business in Malaysia

Apache Kafka Streams Use Case

  • 1. Kafka Streams Distributed, fault tolerant stream processing
  • 2. Kafka Streams: Stream-table duality ● Almost every stream processing needs database ● Stream of key-value messages can be considered as changelog of virtual two- column table ● Also changelog of this table can produce the same original stream
  • 3. Kafka Streams Concepts: Ktable and Kstream ● In KStream each data record represents a self-contained datum in unbounded dataset ("alice", 1) --> ("alice", 3): sum for key “alice” will return 4 ● In KTable each data record represents an update in changelog stream ("alice", 1) --> ("alice", 3): sum for key “alice” will return 3 ● KTable provides an ability to look up current values of data records by keys, which is available through join operations.
  • 4. Kafka Streams: Stateless transformations ● Both KStream and KTable are created from Kafka topic ● Following standard stateless transformations are available: - Branch (split) - Filter - Map - Flatmap - GroupBy - Peek etc…. ● All transformation methods can be chained together to compose a complex processor topology
  • 5. Kafka Streams: Time Kafka Streams supports the following notions of time: ● Event time: The point in time when an event or data record occurred, created “by the source” ● Processing time: The point in time when the event or data record happens to be processed by the stream processing application ● Ingestion-time: The point in time when an event or data record is stored in a topic partition by a Kafka broker.
  • 6. Kafka Streams: Aggregation and Join ● An aggregation operation takes one input stream or table, and yields a new table by combining multiple input records into a single output record. Examples of aggregations are computing counts or sum. ● Aggregation API has standard implementations ready like count and reduce. ● A join operation merges two input streams and/or tables based on the keys of their data records, and yields a new stream/table ● Records can be joined only by key. ● Logic depends on type of sources, so KStream-to-KStream, KStream-to-KTable and KTable-to-KTable join are slightly different operations.
  • 10. Price alert feature: Classic ● Save user requests for price alerts to database ● Pay attention to flight offers add/update date ● Create complicated database queries to join user requests and new offers according to date, source and destination ● Use scheduler for publishing price alerts
  • 11. Price alert feature: Event driven!
  • 12. Price alert feature: Kafka Streams solution
  • 13. Anatoly Tikhonov anatoly.tihonov@mentory.io https://www.linkedin.com/in/anatoly-tikhonov- 8617a483/ THANK YOU!