SlideShare a Scribd company logo
Microservices with Kafka
László-Róbert ALBERT
Dan BALESCU Casablanca • 02 November 2016
Róbert
Dan
ING Software Development Center
Bucharest
3
ING Software Development Center
Bucharest
4
IT
5,7% of GDP with 100k ppl
Agriculture
4,4% of GDP with 1.8 million ppl
5
FAULT
TOLERANCE
PERFORMANCE
RELIABILITY
SECURITY
AVAILABILITY
HIGH
SCALABILITY
REPLICATION
CHANGE
SELF HEALING
6
7
8
Account
Manager
9
Account
Manager
Core
Banking
10
Account
Manager
Core
Banking
Transfer
11
Account
Manager
Core
Banking
Transfer
12
Source: http://www.slideshare.net/dberkholz/
how-microservices-are-redefining-
modern-application-architecture
13
Source: http://www.slideshare.net/dberkholz/
how-microservices-are-redefining-
modern-application-architecture
14
500 million messages / day
15
500 million messages / day 700 billion messages / day
16
500 million messages / day 700 billion messages / day 1.4 trillion messages / day
17
500 million messages / day 700 billion messages / day 1.4 trillion messages / day
18
Messaging Brokers Features
19
Kafka ActiveMQ RabbitMQ
Messaging Brokers Features
20
Support for multiple protocols
- Advanced Message Queueing Protocol
- Streaming Text Oriented Messaging Protocol
- Message Queuing Telemetry Transport
- Etc
Kafka ActiveMQ RabbitMQ
Messaging Brokers Features
21
Support for multiple protocols
- Advanced Message Queueing Protocol
- Streaming Text Oriented Messaging Protocol
- Message Queuing Telemetry Transport
- Etc
Kafka ActiveMQ RabbitMQ
Java Messaging System
Messaging Brokers Features
22
Support for multiple protocols
- Advanced Message Queueing Protocol
- Streaming Text Oriented Messaging Protocol
- Message Queuing Telemetry Transport
- Etc
Kafka ActiveMQ RabbitMQ
Java Messaging System
Java Authentication and Authorization Service
Simple Authentication and Security Layer
Messaging Brokers Features
23
Support for multiple protocols
- Advanced Message Queueing Protocol
- Streaming Text Oriented Messaging Protocol
- Message Queuing Telemetry Transport
- Etc
Kafka ActiveMQ RabbitMQ
Java Messaging System
Java Authentication and Authorization Service
Simple Authentication and Security Layer
Transactions
Messaging Brokers Features
24
Support for multiple protocols
- Advanced Message Queueing Protocol
- Streaming Text Oriented Messaging Protocol
- Message Queuing Telemetry Transport
- Etc
Kafka ActiveMQ RabbitMQ
Java Messaging System
Java Authentication and Authorization Service
Simple Authentication and Security Layer
Transactions
Filtering
Messaging Brokers Features
25
Support for multiple protocols
- Advanced Message Queueing Protocol
- Streaming Text Oriented Messaging Protocol
- Message Queuing Telemetry Transport
- Etc
Kafka ActiveMQ RabbitMQ
Java Messaging System
Java Authentication and Authorization Service
Simple Authentication and Security Layer
Transactions
Filtering
Persistence
26
Performance
Features
27
Messaging Brokers Performance
Message producing Message consumption
LinkedIn – Kafka: a Distributed Messaging System for Log Processing
28
Performance
Features
29
Usecases of Kafka
Consumer
Microservice A Microservice B
Transport API
Producer
30
Usecases of Kafka
Consumer
Microservice A Microservice B
Transport API
Producer
Consumer
Producer
31
Usecases of Kafka
Microservice A Microservice B
Transport API
Producer
Consumer
Microservice C
Consumer
32
System Availability & Performance
33
System Availability & Performance
34
Scalability
35
Scalability
36
Usecases of Kafka
Microservice A ELK stackKafka ConsumerKafka Appender
K
A
F
K
A
© ING 2016
37
Producer
// build a 'default' factory based on your-implicit-kafka-producer.properties
// - the properties file contains the list of brokers to connect to
ProducerFactory factory = ProducerFactory.builder().build();
// create a message producer with a Payload that sends the messages to topic ‘test’
Producer<Message<Payload>> producer =
factory.createMessageProducer("test", Payload.class);
// send a Message { header: Map<String, String>; payload: Payload }
producer.send(
Message.<Payload> builder()
.header("applicationId", "sample-producer")
.header("timestamp", now())
.payload(new Payload("/some/file/path"))
.build()
);
38
Producer
Native
Kafka Producer
API
your-implicit-producer.properties
your-security.properties
39
Consumer
// build a 'default' factory – your-implicit-kafka-consumer.properties
// - the properties contains the list of brokers from which it will receive messages
ConsumerFactory factory = ConsumerFactory.builder().build();
// obtain a consumer instance that can process Message<Payload> messages
Consumer<Message<Payload>> consumer = factory.createMessageConsumer(Payload.class);
// prepare the message (Message { header: Map<String, String>; payload: Payload } ) handler
ReceiverHandler<Message<Payload>> messageReceiver =
new ReceiverHandler<Message<Payload>>() {
@Override
public void onReceive(Message<Payload> message) {
System.out.printf("message received: %s%n", message);
}
};
// register the handler to receive messages from the topic named “test”
consumer.registerHandler("test", messageReceiver);
© ING 2016
40
Consumer
Native
Kafka Consumer
API
your-implicit-consumer.properties
your-security.properties
41
KafkaAppender
ELK
KAFKA
Microservice A
Logback
File
Appender
Kafka Appender
Kafka Producer
Logstash
Fordwarder
43
Mutual TLS - your-security.properties
# The location of the key store file.
kafka.tls.keystore.location=/full/path/to/a/keystore.jks
# The store password for the key store file.
kafka.tls.keystore.password=some-good-password
# The file format of the key store file.
kafka.tls.keystore.type=JKS
# The password of the private key in the key store file
kafka.tls.key.password=the-private-keys-password
# The location of the trust store file.
kafka.tls.truststore.location=/path/to/truststore.p12
# The password for the trust store file.
kafka.tls.truststore.password=some-other-good-password
# The file format of the trust store file
kafka.tls.truststore.type=PKCS12
© ING 2016
44
Serialize
Producer
1
Metadata
N
Metadata
1 N
Transformer Serializer
MetadataMetadata
KAFKA1 2 3
45
Filter
Microservice A
Kafka
Producer
Microservice B
Kafka
Consumer
KAFKA
Topic A
Kafka Consumer Kafka Producer
Metadata
Topic B
Filter
Transformer
46
Transformer
Microservice A
Kafka
Producer
Microservice B
Kafka
Consumer
KAFKA
Topic A Topic B
1
Kafka Consumer Kafka Producer
Metadata
1 2
1 2
2
47
Forward & Dispatch
Microservice A
Kafka
Producer
Microservice B
Kafka
Consumer
KAFKA
Topic A
Topic C
Kafka Consumer
Metadata
Topic B
Topic N
Kafka Producer
1
1
1 1
Microservice D
Kafka
Consumer
Microservice Z
Kafka
Consumer
Forward & Dispatch
48
Replay
0 1 2 3 i NN-1
beginning i end
Microservice A
49
Performance
Features
50
Performance
Features
FILTERINGDISPATCH
51
Performance
FeaturesFILTERINGDISPATCH
Use microservices with Kafka …
… code ahead of the curve
László-Róbert ALBERT
Dan BALESCU Casablanca • 02 November 2016
@danbalescu https://www.linkedin.com/in/albertlaszlorobert

More Related Content

PPTX
Reducing Microservice Complexity with Kafka and Reactive Streams
PPTX
Apache kafka
PDF
Introduction to apache kafka
PDF
Apache Kafka - Martin Podval
PDF
Apache Kafka Introduction
PPTX
Introduction to Apache Kafka
PDF
Kafka Summit SF 2017 - Kafka Connect Best Practices – Advice from the Field
PDF
Reducing Microservice Complexity with Kafka and Reactive Streams
Apache kafka
Introduction to apache kafka
Apache Kafka - Martin Podval
Apache Kafka Introduction
Introduction to Apache Kafka
Kafka Summit SF 2017 - Kafka Connect Best Practices – Advice from the Field

What's hot (20)

PPTX
Protecting your data at rest with Apache Kafka by Confluent and Vormetric
PDF
Introduction to Apache Kafka
PPTX
Kafka 0.8.0 Presentation to Atlanta Java User's Group March 2013
PPTX
Building an Event Bus at Scale
PDF
Building Stream Infrastructure across Multiple Data Centers with Apache Kafka
PDF
Building High-Throughput, Low-Latency Pipelines in Kafka
PDF
Hello, kafka! (an introduction to apache kafka)
PDF
Apache Kafka - Free Friday
PPTX
Fundamentals and Architecture of Apache Kafka
PDF
Fundamentals of Apache Kafka
PPTX
Apache Kafka
PDF
Securing Kafka
PDF
Sharing is Caring: Toward Creating Self-tuning Multi-tenant Kafka (Anna Povzn...
PDF
Everything you ever needed to know about Kafka on Kubernetes but were afraid ...
PPTX
Apache Kafka: Next Generation Distributed Messaging System
PPTX
kafka for db as postgres
ODP
Kafka aws
PDF
Effectively-once semantics in Apache Pulsar
PPTX
Building Event-Driven Systems with Apache Kafka
PPTX
AMIS SIG - Introducing Apache Kafka - Scalable, reliable Event Bus & Message ...
Protecting your data at rest with Apache Kafka by Confluent and Vormetric
Introduction to Apache Kafka
Kafka 0.8.0 Presentation to Atlanta Java User's Group March 2013
Building an Event Bus at Scale
Building Stream Infrastructure across Multiple Data Centers with Apache Kafka
Building High-Throughput, Low-Latency Pipelines in Kafka
Hello, kafka! (an introduction to apache kafka)
Apache Kafka - Free Friday
Fundamentals and Architecture of Apache Kafka
Fundamentals of Apache Kafka
Apache Kafka
Securing Kafka
Sharing is Caring: Toward Creating Self-tuning Multi-tenant Kafka (Anna Povzn...
Everything you ever needed to know about Kafka on Kubernetes but were afraid ...
Apache Kafka: Next Generation Distributed Messaging System
kafka for db as postgres
Kafka aws
Effectively-once semantics in Apache Pulsar
Building Event-Driven Systems with Apache Kafka
AMIS SIG - Introducing Apache Kafka - Scalable, reliable Event Bus & Message ...
Ad

Viewers also liked (20)

PDF
REST vs. Messaging For Microservices
PDF
"Containers, DevOps, Microservices and Kafka: Tools used by our Monolith wrec...
PDF
Distributed stream processing with Apache Kafka
PPTX
Kafka presentation
PPTX
IPaaS: Cloud Integration Analysis
PPT
Integration in the Cloud
PDF
Summer School 2013 - What is iPaaS and why it is important
PDF
iPaas with Fuse Fabric Technology
PDF
Webinar: iPaaS in the Enterprise - What to Look for in a Cloud Integration Pl...
PDF
Developing real-time data pipelines with Spring and Kafka
PPTX
Real-time streaming and data pipelines with Apache Kafka
PDF
Confluent kafka meetupseattle jan2017
PDF
Monitoring Apache Kafka with Confluent Control Center
PPTX
Técnicas presentacion
PPTX
About Lukas Rosenblum
PPTX
iPaaS: A platform for Integration technology convergence
PPTX
Spark Tips & Tricks
PPTX
Microservices in the Apache Kafka Ecosystem
PPTX
Mule iON - OSS ESB to iPaaS
PPTX
Azure IPaaS: #IntegrationEvolved (Glenn Colpaert @ Codit's BizTalk 2016 Launch)
REST vs. Messaging For Microservices
"Containers, DevOps, Microservices and Kafka: Tools used by our Monolith wrec...
Distributed stream processing with Apache Kafka
Kafka presentation
IPaaS: Cloud Integration Analysis
Integration in the Cloud
Summer School 2013 - What is iPaaS and why it is important
iPaas with Fuse Fabric Technology
Webinar: iPaaS in the Enterprise - What to Look for in a Cloud Integration Pl...
Developing real-time data pipelines with Spring and Kafka
Real-time streaming and data pipelines with Apache Kafka
Confluent kafka meetupseattle jan2017
Monitoring Apache Kafka with Confluent Control Center
Técnicas presentacion
About Lukas Rosenblum
iPaaS: A platform for Integration technology convergence
Spark Tips & Tricks
Microservices in the Apache Kafka Ecosystem
Mule iON - OSS ESB to iPaaS
Azure IPaaS: #IntegrationEvolved (Glenn Colpaert @ Codit's BizTalk 2016 Launch)
Ad

Similar to Devoxx Morocco 2016 - Microservices with Kafka (20)

PPTX
Distributed messaging with Apache Kafka
ODP
Introduction to Apache Kafka- Part 2
PDF
Building a Streaming Platform with Kafka
PDF
Trivadis TechEvent 2016 Apache Kafka - Scalable Massage Processing and more! ...
PDF
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
PDF
Developing Real-Time Data Pipelines with Apache Kafka
PPTX
Apache kafka
PPTX
Apache kafka
PPTX
Jafka guide
PDF
Apache Kafka - Scalable Message-Processing and more !
PDF
Cluster_Performance_Apache_Kafak_vs_RabbitMQ
PDF
Developing Realtime Data Pipelines With Apache Kafka
PPTX
Removing dependencies between services: Messaging and Apache Kafka
PPTX
Unleashing Real-time Power with Kafka.pptx
PDF
Polyglot, Fault Tolerant Event-Driven Programming with Kafka, Kubernetes and ...
PPTX
Apache kafka
PDF
apachekafka-160907180205.pdf
PPTX
Kafka tutorial
ODP
Apache Kafka Demo
PPTX
Introduction to Kafka with Spring Integration
Distributed messaging with Apache Kafka
Introduction to Apache Kafka- Part 2
Building a Streaming Platform with Kafka
Trivadis TechEvent 2016 Apache Kafka - Scalable Massage Processing and more! ...
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Developing Real-Time Data Pipelines with Apache Kafka
Apache kafka
Apache kafka
Jafka guide
Apache Kafka - Scalable Message-Processing and more !
Cluster_Performance_Apache_Kafak_vs_RabbitMQ
Developing Realtime Data Pipelines With Apache Kafka
Removing dependencies between services: Messaging and Apache Kafka
Unleashing Real-time Power with Kafka.pptx
Polyglot, Fault Tolerant Event-Driven Programming with Kafka, Kubernetes and ...
Apache kafka
apachekafka-160907180205.pdf
Kafka tutorial
Apache Kafka Demo
Introduction to Kafka with Spring Integration

Recently uploaded (20)

PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
medical staffing services at VALiNTRY
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
System and Network Administraation Chapter 3
PPTX
history of c programming in notes for students .pptx
PPTX
Introduction to Artificial Intelligence
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
ISO 45001 Occupational Health and Safety Management System
Operating system designcfffgfgggggggvggggggggg
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
How to Choose the Right IT Partner for Your Business in Malaysia
Wondershare Filmora 15 Crack With Activation Key [2025
CHAPTER 2 - PM Management and IT Context
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Odoo POS Development Services by CandidRoot Solutions
medical staffing services at VALiNTRY
Design an Analysis of Algorithms I-SECS-1021-03
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
System and Network Administraation Chapter 3
history of c programming in notes for students .pptx
Introduction to Artificial Intelligence
ManageIQ - Sprint 268 Review - Slide Deck
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
How Creative Agencies Leverage Project Management Software.pdf
Upgrade and Innovation Strategies for SAP ERP Customers
Odoo Companies in India – Driving Business Transformation.pdf
ISO 45001 Occupational Health and Safety Management System

Devoxx Morocco 2016 - Microservices with Kafka