SlideShare a Scribd company logo
Bogdan Sucaciu
Deloitte Digital | Pluralsight
Demystifying Event-Driven
Architectures with Apache
Kafka
bsucaciu.com
@bsucaciu
linkedin.com/bogdan-sucaciu
Bogdan Sucaciu
Deloitte Digital | Pluralsight
Demystifying Event-Driven
Architectures with Apache
Kafka
bsucaciu.com
@bsucaciu
linkedin.com/bogdan-sucaciu
Bogdan Sucaciu
Deloitte Digital | Pluralsight
Demystifying Event-Driven
Architectures with Apache
Kafka
bsucaciu.com
@bsucaciu
linkedin.com/bogdan-sucaciu
The Monolith
The Monolith
A lot of code
goes in here
The Problem
GOOD
BAD
Scalability
The Monolith
SOA
Microservices
Challenge
GOOD
BAD
Scalability
Challenge -> Solution
GOOD
BAD
Scalability
Challenge -> Solution -> New Challenge
GOOD
BAD
Data Access
Scalability
Microservices
Coupling
Distributed
Transactions
Timeouts
Dependency Management
Data Ownership
Event-Driven Architecture
Software architecture paradigm promoting
production, consumption of, and reaction of
events
- Wikipedia
EDA
EDA
REST
Queue
REST
EDA
EDA
Producer
Consumer
Event Stream
Event Stream
Event Stream
Consumer
Producer /
Consumer
Producer /
Consumer
EDA
Producer
Consumer
Event Stream
Event Stream
Event Stream
Consumer
Producer /
Consumer
Producer /
Consumer
EDA
Producer
Consumer
Event Stream
Event Stream
Event Stream
Consumer
Producer /
Consumer
Producer /
Consumer
EDA
Event
Stream
Logs
Topics
Queues
WebSockets
Reactive
APIs
Persisted Events
Reactive Events
EDA
Producer
Consumer
Event Stream
Event Stream
Event Stream
Consumer
Producer /
Consumer
Producer /
Consumer
EDA with Apache Kafka
Kafka Broker
Topics
EDA with Apache Kafka
Kafka Broker Inversion of Control
Fan-out
1 P-type / Event Stream
Producers don’t know
Consumers
Topics
Challenge
GOOD
BAD
Data Access
Scalability
Challenge -> Solution
GOOD
BAD
Data Access
Scalability
Challenge -> Solution -> New Challenge
GOOD
BAD
Data Access Consistency
Scalability
The key to building successful EDA is
understanding and accepting
Eventual Consistency
Past Present Future
Query Command
Event
A B
Message
A B
A ? A B
A ?B
A B
Event Notification
Event Producer Event Consumer
private static String TOPIC = "event-notification";
…
Properties props = new Properties();
props.put(BOOTSTRAP_SERVERS_CONFIG, "broker:9092");
props.put(KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName());
props.put(VALUE_SERIALIZER_CLASS_CONFIG,
StringSerializer.class.getName());
KafkaProducer<String, String> producer = new KafkaProducer<>(props);
ProducerRecord<String, String> producerRecord = new
ProducerRecord<>(TOPIC, key, value);
producer.send(producerRecord);
private static String TOPIC = "event-notification";
…
Properties props = new Properties();
props.put(GROUP_ID_CONFIG, "event.consumer");
props.put(BOOTSTRAP_SERVERS_CONFIG, "broker:9092");
props.put(KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
props.put(VALUE_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
KafkaConsumer<String, String> consumer = new KafkaConsumer<>(props);
consumer.subscribe(Collections.singletonList(TOPIC));
while(true) {
ConsumerRecords<String, String> records = consumer.poll(ofMillis(100));
records.forEach(record -> processRecord(record));
}
Producer Consumer 3
Consumer 2
Consumer 1
Producer Consumer 3
Consumer 2
Consumer 1
Event-Carried
State Transfer
Address Changed Event
P
Kafka Broker
C1
C2
C3
Only new address?
Old & new address?
User info?
?
Address Changed Event
P
Only new address
C1
C2
C3
Kafka Broker
Address Changed Event
P
C1
C2
C3
Kafka Broker
Address Changed Event
P
C1
C2
C3
Kafka Broker
Address Changed Event
P
Tax
C2
C3
Kafka Broker
Avoid querying back the
source system when using events!
Avoid querying back the
source system when using events!
Events still make sense
after 10 years in a datalake!
Distributed Source of Truth
Event Sourcing
Event Sourcing
Initial Amount 0
Add 500
Add 200
Subtract 300
0
Current Amount
Event Sourcing
Initial Amount 0
Add 500
Add 200
Subtract 300
Current Amount 500
Event Sourcing
Initial Amount 0
Add 500
Add 200
Subtract 300
Current Amount 700
Event Sourcing
Initial Amount 0
Add 500
Add 200
Subtract 300
Current Amount 400
GIT
Event Sourcing
Event Stream
C2
C1 C3
Game on
bsucaciu.com
@bsucaciu
linkedin.com/bogdan-sucaciu

More Related Content

PDF
Live Event Debugging With ksqlDB at Reddit | Hannah Hagen and Paul Kiernan, R...
PDF
Moving 150 TB of data resiliently on Kafka With Quorum Controller on Kubernet...
PDF
Writing Blazing Fast, and Production-Ready Kafka Streams apps in less than 30...
PDF
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
PDF
Taming a massive fleet of Python-based Kafka apps at Robinhood | Chandra Kuch...
PPTX
From Kafka to BigQuery - Strata Singapore
PDF
Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...
PPTX
Cloud-Based Event Stream Processing Architectures and Patterns with Apache Ka...
Live Event Debugging With ksqlDB at Reddit | Hannah Hagen and Paul Kiernan, R...
Moving 150 TB of data resiliently on Kafka With Quorum Controller on Kubernet...
Writing Blazing Fast, and Production-Ready Kafka Streams apps in less than 30...
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
Taming a massive fleet of Python-based Kafka apps at Robinhood | Chandra Kuch...
From Kafka to BigQuery - Strata Singapore
Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...
Cloud-Based Event Stream Processing Architectures and Patterns with Apache Ka...

What's hot (20)

PDF
Bank of China Tech Talk 2: Introduction to Streaming Data and Stream Processi...
PDF
The Road Most Traveled: A Kafka Story | Heikki Nousiainen, Aiven
PDF
Kubernetes connectivity to Cloud Native Kafka | Evan Shortiss and Hugo Guerre...
PDF
Exposing and Controlling Kafka Event Streaming with Kong Konnect Enterprise |...
PDF
Creating a Kafka Topic. Super easy? | Andrew Stevenson and Marios Andreopoulo...
PDF
Apache Kafka and KSQL in Action: Let's Build a Streaming Data Pipeline!
PDF
5 lessons learned for successful migration to Confluent cloud | Natan Silinit...
PDF
Why SQL? | Kenny Gorman, Cloudera
PDF
Kafka in Context, Cloud, & Community (Simon Elliston Ball, Cloudera) Kafka Su...
PDF
Stream Processing with Apache Kafka and .NET
PDF
Building adaptive user experiences using Contextual Multi-Armed Bandits with...
PDF
Mind the App: How to Monitor Your Kafka Streams Applications | Bruno Cadonna,...
PDF
The New Way of Configuring Grace Periods for Windowed Operations in Kafka Str...
PDF
Event-driven Applications with Kafka, Micronaut, and AWS Lambda | Dave Klein,...
PDF
Mainframe Integration, Offloading and Replacement with Apache Kafka | Kai Wae...
PDF
Automate Your Kafka Cluster with Kubernetes Custom Resources
PDF
Confluent On Azure: Why you should add Confluent to your Azure toolkit | Alic...
PDF
How to Discover, Visualize, Catalog, Share and Reuse your Kafka Streams (Jona...
PPTX
Keeping Analytics Data Fresh in a Streaming Architecture | John Neal, Qlik
PDF
Event-driven Applications with Kafka, Micronaut, and AWS Lambda | Dave Klein,...
Bank of China Tech Talk 2: Introduction to Streaming Data and Stream Processi...
The Road Most Traveled: A Kafka Story | Heikki Nousiainen, Aiven
Kubernetes connectivity to Cloud Native Kafka | Evan Shortiss and Hugo Guerre...
Exposing and Controlling Kafka Event Streaming with Kong Konnect Enterprise |...
Creating a Kafka Topic. Super easy? | Andrew Stevenson and Marios Andreopoulo...
Apache Kafka and KSQL in Action: Let's Build a Streaming Data Pipeline!
5 lessons learned for successful migration to Confluent cloud | Natan Silinit...
Why SQL? | Kenny Gorman, Cloudera
Kafka in Context, Cloud, & Community (Simon Elliston Ball, Cloudera) Kafka Su...
Stream Processing with Apache Kafka and .NET
Building adaptive user experiences using Contextual Multi-Armed Bandits with...
Mind the App: How to Monitor Your Kafka Streams Applications | Bruno Cadonna,...
The New Way of Configuring Grace Periods for Windowed Operations in Kafka Str...
Event-driven Applications with Kafka, Micronaut, and AWS Lambda | Dave Klein,...
Mainframe Integration, Offloading and Replacement with Apache Kafka | Kai Wae...
Automate Your Kafka Cluster with Kubernetes Custom Resources
Confluent On Azure: Why you should add Confluent to your Azure toolkit | Alic...
How to Discover, Visualize, Catalog, Share and Reuse your Kafka Streams (Jona...
Keeping Analytics Data Fresh in a Streaming Architecture | John Neal, Qlik
Event-driven Applications with Kafka, Micronaut, and AWS Lambda | Dave Klein,...
Ad

Similar to Demystifying Event-Driven Architectures with Apache Kafka | Bogdan Sucaciu, Pluralsight (20)

PPTX
Demystifying Event-Driven Architectures with Apache Kafka
PDF
Implementing Domain Events with Kafka
PPTX
Evolutionary Systems - Kafka Microservices
PPTX
Event Driven Architectures
PDF
Event Driven Architectures
PPTX
Kafka and event driven architecture -apacoug20
PPTX
Kafka and event driven architecture -og yatra20
PDF
Event driven-arch
PPT
Kafka-and-event-driven-architecture-OGYatra20.ppt
PDF
Building Event Driven Services with Apache Kafka and Kafka Streams - Devoxx B...
PDF
10 essentials steps for kafka streaming services
PDF
Battle Tested Event-Driven Patterns for your Microservices Architecture
PDF
Battle Tested Event-Driven Patterns for your Microservices Architecture - Ris...
PPTX
Apache kafka
PDF
Battle Tested Event-Driven Patterns for your Microservices Architecture - Dev...
PPTX
Event Driven Architectures with Apache Kafka
PDF
Battle-tested event-driven patterns for your microservices architecture - Sca...
PDF
Making kafka dance
PPTX
Building Event Driven Architectures with Kafka and Cloud Events (Dan Rosanova...
PDF
Jax london - Battle-tested event-driven patterns for your microservices archi...
Demystifying Event-Driven Architectures with Apache Kafka
Implementing Domain Events with Kafka
Evolutionary Systems - Kafka Microservices
Event Driven Architectures
Event Driven Architectures
Kafka and event driven architecture -apacoug20
Kafka and event driven architecture -og yatra20
Event driven-arch
Kafka-and-event-driven-architecture-OGYatra20.ppt
Building Event Driven Services with Apache Kafka and Kafka Streams - Devoxx B...
10 essentials steps for kafka streaming services
Battle Tested Event-Driven Patterns for your Microservices Architecture
Battle Tested Event-Driven Patterns for your Microservices Architecture - Ris...
Apache kafka
Battle Tested Event-Driven Patterns for your Microservices Architecture - Dev...
Event Driven Architectures with Apache Kafka
Battle-tested event-driven patterns for your microservices architecture - Sca...
Making kafka dance
Building Event Driven Architectures with Kafka and Cloud Events (Dan Rosanova...
Jax london - Battle-tested event-driven patterns for your microservices archi...
Ad

More from HostedbyConfluent (20)

PDF
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
PDF
Renaming a Kafka Topic | Kafka Summit London
PDF
Evolution of NRT Data Ingestion Pipeline at Trendyol
PDF
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
PDF
Exactly-once Stream Processing with Arroyo and Kafka
PDF
Fish Plays Pokemon | Kafka Summit London
PDF
Tiered Storage 101 | Kafla Summit London
PDF
Building a Self-Service Stream Processing Portal: How And Why
PDF
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
PDF
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
PDF
Navigating Private Network Connectivity Options for Kafka Clusters
PDF
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
PDF
Explaining How Real-Time GenAI Works in a Noisy Pub
PDF
TL;DR Kafka Metrics | Kafka Summit London
PDF
A Window Into Your Kafka Streams Tasks | KSL
PDF
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
PDF
Data Contracts Management: Schema Registry and Beyond
PDF
Code-First Approach: Crafting Efficient Flink Apps
PDF
Debezium vs. the World: An Overview of the CDC Ecosystem
PDF
Beyond Tiered Storage: Serverless Kafka with No Local Disks
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Renaming a Kafka Topic | Kafka Summit London
Evolution of NRT Data Ingestion Pipeline at Trendyol
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Exactly-once Stream Processing with Arroyo and Kafka
Fish Plays Pokemon | Kafka Summit London
Tiered Storage 101 | Kafla Summit London
Building a Self-Service Stream Processing Portal: How And Why
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Navigating Private Network Connectivity Options for Kafka Clusters
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
Explaining How Real-Time GenAI Works in a Noisy Pub
TL;DR Kafka Metrics | Kafka Summit London
A Window Into Your Kafka Streams Tasks | KSL
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
Data Contracts Management: Schema Registry and Beyond
Code-First Approach: Crafting Efficient Flink Apps
Debezium vs. the World: An Overview of the CDC Ecosystem
Beyond Tiered Storage: Serverless Kafka with No Local Disks

Recently uploaded (20)

PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
A Presentation on Artificial Intelligence
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Approach and Philosophy of On baking technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Per capita expenditure prediction using model stacking based on satellite ima...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Dropbox Q2 2025 Financial Results & Investor Presentation
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
20250228 LYD VKU AI Blended-Learning.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Spectral efficient network and resource selection model in 5G networks
A Presentation on Artificial Intelligence
“AI and Expert System Decision Support & Business Intelligence Systems”
Review of recent advances in non-invasive hemoglobin estimation
NewMind AI Weekly Chronicles - August'25 Week I
Building Integrated photovoltaic BIPV_UPV.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Mobile App Security Testing_ A Comprehensive Guide.pdf
Approach and Philosophy of On baking technology

Demystifying Event-Driven Architectures with Apache Kafka | Bogdan Sucaciu, Pluralsight