SlideShare a Scribd company logo
Pulsar For Kafka People
1 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Introducing Pulsar
Architectures
API and Programming Differences
Use Cases
Pulsar For Kafka People
2 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Apache Pulsar is a distributed
event streaming system
Apache Pulsar
• It uses a distributed log to
durably store messages
• Pulsar was originally created
at Yahoo
• Open sourced in 2016
• Graduated to a top-level
Apache project in 2018
3 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Kafka is a distributed publish
subscribe system
Apache Kafka
• It uses a commit log to track
changes
• Kafka was originally created
at LinkedIn
• Open sourced in 2011
• Graduated to a top-level
Apache project in 2012
4 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Introducing Pulsar
Architectures
API and Programming Differences
Use Cases
Pulsar For Kafka People
5 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Basic Kafka Architecture
Publisher SubscriberKafka
Publisher sends data and
doesn't know about the
subscribers or their status.
Subscriber recieves data from
publisher and never directly
interacts with it.
All interactions go through
Kafka and it handles all
communication.
6 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Basic Pulsar Architecture
Producer ConsumerPulsar
Producers do not directly
interact with the BookKeeper
cluster.
Consumers do not directly
interact with the BookKeeper
cluster.
All Brokers in the Pulsar
cluster are stateless and can
be scaled independently.
BookKeeper All Bookies in the BookKeeper
cluster are stateful and can
be scaled independently.
7 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Kafka Partitions
Producer 0
Data is divided into partitions.
Partitions are both logical
and physical divisions.
Producer 1
Topic
Partition 0 Partition 1 Partition 2
All data is sent and received
on topics. Topics group like
data together.
8 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Pulsar Ledgers
The individual messages that
are produced are stored as
records in the ledger.
Stream
Ledger 1 Ledger 2 Ledger 3
Record 1 Record 2 Record 3 Record 4
Each topic has it's own stream
and all data for a topic
is stored in it.
As more data is added to a
topic, new ledgers are
allocated to store the data.
9 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Kafka Consumers
Producer 0
Consumer recieves data from
all topic partitions and connects
to brokers 0, 1, and 2.
Producer 1
Broker 0 Broker 1 Broker 2
Topic
Partition 0 Partition 1 Partition 2
Consumer (P012)
10 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Pulsar Subscriptions
Producer 0
In failover, all partitions are
consumed by one consumer and
will fail over to hot spare on fail.
Producer 1
Broker 0 Broker 1 Broker 2
Topic
Partition 0 Partition 1 Partition 2
Failover Sub. (P012)
Shared Sub. (P012)
In shared, messages are
sent in a round robin way to
all consumers.
Shared Sub. (P012)
Key Shared (P012)
Key Shared (P012)
Failover Sub. (P)
In key shared, messages with
the same key are consistently
routed to the same consumer.
11 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Introducing Pulsar
Architectures
API and Programming Differences
Use Cases
Pulsar For Kafka People
12 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.ProducerRecord;
import static org.apache.kafka.clients.producer.ProducerConfig.*;
Properties props = new Properties();
// Configure brokers to connect to
props.put(BOOTSTRAP_SERVERS_CONFIG, "broker1:9092");
// Create a producer with the key as a string and value as a string
KafkaProducer<String, String> producer = new KafkaProducer<>(props,
new StringSerializer(), new StringSerializer());
// Create ProducerRecord and send it
String key = "mykey";
String value = "myvalue";
ProducerRecord<String, String> record = new
ProducerRecord<>("hello_topic", key, value);
producer.send(record);
producer.close();
Kafka Producer API
13 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
PulsarClient client = PulsarClient.builder()
.serviceUrl("pulsar://broker1:6650")
.build();
// Create a producer that will send values as strings
// Default is byte[]
Producer<String> producer = client
.newProducer(Schema.STRING)
.topic("hellotopic")
.create();
// Create a new message, send it, and block until it is
// acknowledged
producer.newMessage()
.key("mykey")
.value("myvalue")
.send();
// Create a new message, send it, and don't block until it is
// acknowledged
producer.newMessage()
.key("mykey2")
.value("myvalue2")
.sendAsync();
// Close producer and client
producer.close();
client.close();
Pulsar Producer API
14 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.apache.kafka.clients.consumer.ConsumerRecords;
import org.apache.kafka.clients.consumer.KafkaConsumer;
import static org.apache.kafka.clients.consumer.ConsumerConfig.*;
@SuppressWarnings("unused")
public class HelloConsumer {
KafkaConsumer<String, String> consumer;
public void createConsumer() {
String topic = "hello_topic";
Properties props = new Properties();
// Configure initial location bootstrap servers
props.put(BOOTSTRAP_SERVERS_CONFIG, "broker1:9092");
// Configure consumer group
props.put(GROUP_ID_CONFIG, "group1");
// Create the consumer with the key as a string and value as a string
consumer = new KafkaConsumer<>(props, new StringDeserializer(),
new StringDeserializer());
Kafka Consumer API (1/2)
15 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
consumer.subscribe(Arrays.asList(topic));
while (true) {
// Poll for ConsumerRecords for a certain amount of time
ConsumerRecords<String, String> records = consumer.poll(
Duration.ofMillis(100));
// Process the ConsumerRecords, if any, that came back
for (ConsumerRecord<String, String> record : records) {
String key = record.key();
String value = record.value();
// Do something with message
}
}
}
public void close() {
consumer.close();
}
public static void main(String[] args) {
HelloConsumer consumer = new HelloConsumer();
consumer.createConsumer();
consumer.close();
}
Kafka Consumer API (2/2)
16 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
client = PulsarClient.builder()
.serviceUrl("pulsar://broker1:6650")
.build();
String myTopic = "hellotopic";
String mySubscriptionName = "my-subscription";
// Create a consumer that will receive values as strings
// Default is byte[]
consumer = client.newConsumer(Schema.STRING)
.topic(myTopic)
.subscriptionName(mySubscriptionName)
.subscribe();
while (true) {
// Block and wait until a single message is available
Message<String> message = consumer.receive();
try {
// Do something with the message
System.out.println("Key is "" + message.getKey()
+ "" value is "" + message.getValue()
+ """);
// Acknowledge the message so that it can be
// deleted by the message broker
consumer.acknowledgeCumulative(message);
} catch (Exception e) {
// Message failed to process, redeliver later
consumer.negativeAcknowledge(message);
}
}
Pulsar Consumer API
17 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Both projects have an ecosystem
associated with them
Ecosystem
Projects
• Kafka Streams -> Pulsar
Functions
• KSQLDB (prop) -> Pulsar SQL
• Kafka Connect -> Pulsar IO
• Kafka API compatibility for
Pulsar
18 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Introducing Pulsar
Architectures
API and Programming Differences
Use Cases
Pulsar For Kafka People
19 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Kafka++
All Kafka use cases plus
more
20 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Work Queues
http://tiny.bdi.io/workqueues
21 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Geo-Replication
Built-in geo-replication
22 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Unified
Do both MQ-style and
Pub/Sub-style with the
same cluster
23 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Lots of Topics
Supports millions of topics
24 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
Thank You
bigdatainstitute.io
25 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9

More Related Content

What's hot

Microservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring CloudMicroservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring Cloud
acogoluegnes
 
Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
 Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
distributed matters
 
Monitoring Docker Containers with Metricbeat, Elasticsearch, and Kibana
Monitoring Docker Containers with Metricbeat, Elasticsearch, and KibanaMonitoring Docker Containers with Metricbeat, Elasticsearch, and Kibana
Monitoring Docker Containers with Metricbeat, Elasticsearch, and Kibana
Qbox
 
Three Degrees of Mediation: Challenges and Lessons in building Cloud-agnostic...
Three Degrees of Mediation: Challenges and Lessons in building Cloud-agnostic...Three Degrees of Mediation: Challenges and Lessons in building Cloud-agnostic...
Three Degrees of Mediation: Challenges and Lessons in building Cloud-agnostic...
Alex Maclinovsky
 
OpenStack 101 Technical Overview
OpenStack 101 Technical OverviewOpenStack 101 Technical Overview
OpenStack 101 Technical Overview
Open Stack
 
Hands-on Lab: Migrating Oracle to PostgreSQL
Hands-on Lab: Migrating Oracle to PostgreSQL Hands-on Lab: Migrating Oracle to PostgreSQL
Hands-on Lab: Migrating Oracle to PostgreSQL
Amazon Web Services
 
Building IAM for OpenStack
Building IAM for OpenStackBuilding IAM for OpenStack
Building IAM for OpenStack
Steve Martinelli
 
How to scheduled jobs in a cloudera cluster without oozie
How to scheduled jobs in a cloudera cluster without oozieHow to scheduled jobs in a cloudera cluster without oozie
How to scheduled jobs in a cloudera cluster without oozie
Tiago Simões
 
reModernize-Updating and Consolidating MySQL
reModernize-Updating and Consolidating MySQLreModernize-Updating and Consolidating MySQL
reModernize-Updating and Consolidating MySQL
Amazon Web Services
 
Don't Wait! Develop Responsive Applications with Java EE7 Instead
Don't Wait! Develop Responsive Applications with Java EE7 InsteadDon't Wait! Develop Responsive Applications with Java EE7 Instead
Don't Wait! Develop Responsive Applications with Java EE7 Instead
WASdev Community
 
Hands-on Lab: Comparing Redis with Relational
Hands-on Lab: Comparing Redis with RelationalHands-on Lab: Comparing Redis with Relational
Hands-on Lab: Comparing Redis with Relational
Amazon Web Services
 
Building Microservices with Spring Cloud and Netflix OSS
Building Microservices with Spring Cloud and Netflix OSSBuilding Microservices with Spring Cloud and Netflix OSS
Building Microservices with Spring Cloud and Netflix OSS
Semih Hakkıoğlu
 
Processing messages in a sqs with lambda function
Processing messages in a sqs with lambda functionProcessing messages in a sqs with lambda function
Processing messages in a sqs with lambda function
Subhamay Bhattacharyya
 
5 things you don't know about Amazon Web Services
5 things you don't know about Amazon Web Services5 things you don't know about Amazon Web Services
5 things you don't know about Amazon Web Services
Simone Brunozzi
 
Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring Cloud
Conor Svensson
 
Hands-on Lab - Combaring Redis with Relational
Hands-on Lab - Combaring Redis with RelationalHands-on Lab - Combaring Redis with Relational
Hands-on Lab - Combaring Redis with Relational
Amazon Web Services
 
Introduction to OpenStack Architecture (Grizzly Edition)
Introduction to OpenStack Architecture (Grizzly Edition)Introduction to OpenStack Architecture (Grizzly Edition)
Introduction to OpenStack Architecture (Grizzly Edition)
Ken Pepple
 
Virtual private cloud fundamentals
Virtual private cloud fundamentalsVirtual private cloud fundamentals
Virtual private cloud fundamentals
Sai Viswanath
 
Bt0083 server side programing
Bt0083 server side programing Bt0083 server side programing
Bt0083 server side programing
Techglyphs
 
Aws object storage and cdn(s3, glacier and cloud front) part 2
Aws object storage and cdn(s3, glacier and cloud front)   part 2Aws object storage and cdn(s3, glacier and cloud front)   part 2
Aws object storage and cdn(s3, glacier and cloud front) part 2
Parag Patil
 

What's hot (20)

Microservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring CloudMicroservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring Cloud
 
Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
 Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
 
Monitoring Docker Containers with Metricbeat, Elasticsearch, and Kibana
Monitoring Docker Containers with Metricbeat, Elasticsearch, and KibanaMonitoring Docker Containers with Metricbeat, Elasticsearch, and Kibana
Monitoring Docker Containers with Metricbeat, Elasticsearch, and Kibana
 
Three Degrees of Mediation: Challenges and Lessons in building Cloud-agnostic...
Three Degrees of Mediation: Challenges and Lessons in building Cloud-agnostic...Three Degrees of Mediation: Challenges and Lessons in building Cloud-agnostic...
Three Degrees of Mediation: Challenges and Lessons in building Cloud-agnostic...
 
OpenStack 101 Technical Overview
OpenStack 101 Technical OverviewOpenStack 101 Technical Overview
OpenStack 101 Technical Overview
 
Hands-on Lab: Migrating Oracle to PostgreSQL
Hands-on Lab: Migrating Oracle to PostgreSQL Hands-on Lab: Migrating Oracle to PostgreSQL
Hands-on Lab: Migrating Oracle to PostgreSQL
 
Building IAM for OpenStack
Building IAM for OpenStackBuilding IAM for OpenStack
Building IAM for OpenStack
 
How to scheduled jobs in a cloudera cluster without oozie
How to scheduled jobs in a cloudera cluster without oozieHow to scheduled jobs in a cloudera cluster without oozie
How to scheduled jobs in a cloudera cluster without oozie
 
reModernize-Updating and Consolidating MySQL
reModernize-Updating and Consolidating MySQLreModernize-Updating and Consolidating MySQL
reModernize-Updating and Consolidating MySQL
 
Don't Wait! Develop Responsive Applications with Java EE7 Instead
Don't Wait! Develop Responsive Applications with Java EE7 InsteadDon't Wait! Develop Responsive Applications with Java EE7 Instead
Don't Wait! Develop Responsive Applications with Java EE7 Instead
 
Hands-on Lab: Comparing Redis with Relational
Hands-on Lab: Comparing Redis with RelationalHands-on Lab: Comparing Redis with Relational
Hands-on Lab: Comparing Redis with Relational
 
Building Microservices with Spring Cloud and Netflix OSS
Building Microservices with Spring Cloud and Netflix OSSBuilding Microservices with Spring Cloud and Netflix OSS
Building Microservices with Spring Cloud and Netflix OSS
 
Processing messages in a sqs with lambda function
Processing messages in a sqs with lambda functionProcessing messages in a sqs with lambda function
Processing messages in a sqs with lambda function
 
5 things you don't know about Amazon Web Services
5 things you don't know about Amazon Web Services5 things you don't know about Amazon Web Services
5 things you don't know about Amazon Web Services
 
Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring Cloud
 
Hands-on Lab - Combaring Redis with Relational
Hands-on Lab - Combaring Redis with RelationalHands-on Lab - Combaring Redis with Relational
Hands-on Lab - Combaring Redis with Relational
 
Introduction to OpenStack Architecture (Grizzly Edition)
Introduction to OpenStack Architecture (Grizzly Edition)Introduction to OpenStack Architecture (Grizzly Edition)
Introduction to OpenStack Architecture (Grizzly Edition)
 
Virtual private cloud fundamentals
Virtual private cloud fundamentalsVirtual private cloud fundamentals
Virtual private cloud fundamentals
 
Bt0083 server side programing
Bt0083 server side programing Bt0083 server side programing
Bt0083 server side programing
 
Aws object storage and cdn(s3, glacier and cloud front) part 2
Aws object storage and cdn(s3, glacier and cloud front)   part 2Aws object storage and cdn(s3, glacier and cloud front)   part 2
Aws object storage and cdn(s3, glacier and cloud front) part 2
 

Similar to Pulsar for Kafka People

Developing Realtime Data Pipelines With Apache Kafka
Developing Realtime Data Pipelines With Apache KafkaDeveloping Realtime Data Pipelines With Apache Kafka
Developing Realtime Data Pipelines With Apache Kafka
Joe Stein
 
Developing Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache KafkaDeveloping Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache Kafka
Joe Stein
 
mastering libcurl part 1
mastering libcurl part 1mastering libcurl part 1
mastering libcurl part 1
Daniel Stenberg
 
Apache Kafka - Strakin Technologies Pvt Ltd
Apache Kafka - Strakin Technologies Pvt LtdApache Kafka - Strakin Technologies Pvt Ltd
Apache Kafka - Strakin Technologies Pvt Ltd
Strakin Technologies Pvt Ltd
 
Mqtt 5 meetup dortmund
Mqtt 5 meetup dortmundMqtt 5 meetup dortmund
Mqtt 5 meetup dortmund
Florian Raschbichler
 
I can't believe it's not a queue: Kafka and Spring
I can't believe it's not a queue: Kafka and SpringI can't believe it's not a queue: Kafka and Spring
I can't believe it's not a queue: Kafka and Spring
Joe Kutner
 
Publishing AwsLlambda Logs Into SplunkCloud
Publishing AwsLlambda Logs Into SplunkCloudPublishing AwsLlambda Logs Into SplunkCloud
Publishing AwsLlambda Logs Into SplunkCloud
varun kumar karuna
 
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & PartitioningApache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Guido Schmutz
 
Iot hub agent
Iot hub agentIot hub agent
Iot hub agent
rtfmpliz1
 
Cracking wpa2 psk in the cloud
Cracking wpa2 psk in the cloudCracking wpa2 psk in the cloud
Cracking wpa2 psk in the cloudFotios Lindiakos
 
Helm Charts Security 101
Helm Charts Security 101Helm Charts Security 101
Helm Charts Security 101
Deep Datta
 
Docker at Flux7
Docker at Flux7Docker at Flux7
Docker at Flux7
Aater Suleman
 
Spark Streaming Info
Spark Streaming InfoSpark Streaming Info
Spark Streaming InfoDoug Chang
 
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is StartedEWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
Rob Tweed
 
Enhancing Apache Kafka for Large Scale Real-Time Data Pipeline at Tencent | K...
Enhancing Apache Kafka for Large Scale Real-Time Data Pipeline at Tencent | K...Enhancing Apache Kafka for Large Scale Real-Time Data Pipeline at Tencent | K...
Enhancing Apache Kafka for Large Scale Real-Time Data Pipeline at Tencent | K...
HostedbyConfluent
 
Network Programming-Python-13-8-2023.pptx
Network Programming-Python-13-8-2023.pptxNetwork Programming-Python-13-8-2023.pptx
Network Programming-Python-13-8-2023.pptx
ssuser23035c
 
Fast Streaming into Clickhouse with Apache Pulsar
Fast Streaming into Clickhouse with Apache PulsarFast Streaming into Clickhouse with Apache Pulsar
Fast Streaming into Clickhouse with Apache Pulsar
Timothy Spann
 
Fast Insight from Fast Data: Integrating ClickHouse and Apache Kafka
Fast Insight from Fast Data: Integrating ClickHouse and Apache KafkaFast Insight from Fast Data: Integrating ClickHouse and Apache Kafka
Fast Insight from Fast Data: Integrating ClickHouse and Apache Kafka
Altinity Ltd
 

Similar to Pulsar for Kafka People (20)

Developing Realtime Data Pipelines With Apache Kafka
Developing Realtime Data Pipelines With Apache KafkaDeveloping Realtime Data Pipelines With Apache Kafka
Developing Realtime Data Pipelines With Apache Kafka
 
Developing Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache KafkaDeveloping Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache Kafka
 
mastering libcurl part 1
mastering libcurl part 1mastering libcurl part 1
mastering libcurl part 1
 
Apache Kafka - Strakin Technologies Pvt Ltd
Apache Kafka - Strakin Technologies Pvt LtdApache Kafka - Strakin Technologies Pvt Ltd
Apache Kafka - Strakin Technologies Pvt Ltd
 
Mqtt 5 meetup dortmund
Mqtt 5 meetup dortmundMqtt 5 meetup dortmund
Mqtt 5 meetup dortmund
 
I can't believe it's not a queue: Kafka and Spring
I can't believe it's not a queue: Kafka and SpringI can't believe it's not a queue: Kafka and Spring
I can't believe it's not a queue: Kafka and Spring
 
Publishing AwsLlambda Logs Into SplunkCloud
Publishing AwsLlambda Logs Into SplunkCloudPublishing AwsLlambda Logs Into SplunkCloud
Publishing AwsLlambda Logs Into SplunkCloud
 
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & PartitioningApache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
 
KAFKA Quickstart
KAFKA QuickstartKAFKA Quickstart
KAFKA Quickstart
 
Python networking
Python networkingPython networking
Python networking
 
Iot hub agent
Iot hub agentIot hub agent
Iot hub agent
 
Cracking wpa2 psk in the cloud
Cracking wpa2 psk in the cloudCracking wpa2 psk in the cloud
Cracking wpa2 psk in the cloud
 
Helm Charts Security 101
Helm Charts Security 101Helm Charts Security 101
Helm Charts Security 101
 
Docker at Flux7
Docker at Flux7Docker at Flux7
Docker at Flux7
 
Spark Streaming Info
Spark Streaming InfoSpark Streaming Info
Spark Streaming Info
 
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is StartedEWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
 
Enhancing Apache Kafka for Large Scale Real-Time Data Pipeline at Tencent | K...
Enhancing Apache Kafka for Large Scale Real-Time Data Pipeline at Tencent | K...Enhancing Apache Kafka for Large Scale Real-Time Data Pipeline at Tencent | K...
Enhancing Apache Kafka for Large Scale Real-Time Data Pipeline at Tencent | K...
 
Network Programming-Python-13-8-2023.pptx
Network Programming-Python-13-8-2023.pptxNetwork Programming-Python-13-8-2023.pptx
Network Programming-Python-13-8-2023.pptx
 
Fast Streaming into Clickhouse with Apache Pulsar
Fast Streaming into Clickhouse with Apache PulsarFast Streaming into Clickhouse with Apache Pulsar
Fast Streaming into Clickhouse with Apache Pulsar
 
Fast Insight from Fast Data: Integrating ClickHouse and Apache Kafka
Fast Insight from Fast Data: Integrating ClickHouse and Apache KafkaFast Insight from Fast Data: Integrating ClickHouse and Apache Kafka
Fast Insight from Fast Data: Integrating ClickHouse and Apache Kafka
 

More from Jesse Anderson

Managing Real-Time Data Teams
Managing Real-Time Data TeamsManaging Real-Time Data Teams
Managing Real-Time Data Teams
Jesse Anderson
 
Big Data and Analytics in the COVID-19 Era
Big Data and Analytics in the COVID-19 EraBig Data and Analytics in the COVID-19 Era
Big Data and Analytics in the COVID-19 Era
Jesse Anderson
 
Working Together As Data Teams V1
Working Together As Data Teams V1Working Together As Data Teams V1
Working Together As Data Teams V1
Jesse Anderson
 
What Does an Exec Need to About Architecture and Why
What Does an Exec Need to About Architecture and WhyWhat Does an Exec Need to About Architecture and Why
What Does an Exec Need to About Architecture and Why
Jesse Anderson
 
The Five Dysfunctions of a Data Engineering Team
The Five Dysfunctions of a Data Engineering TeamThe Five Dysfunctions of a Data Engineering Team
The Five Dysfunctions of a Data Engineering Team
Jesse Anderson
 
HBaseCon 2014-Just the Basics
HBaseCon 2014-Just the BasicsHBaseCon 2014-Just the Basics
HBaseCon 2014-Just the Basics
Jesse Anderson
 
Million Monkeys User Group
Million Monkeys User GroupMillion Monkeys User Group
Million Monkeys User Group
Jesse Anderson
 
Strata 2012 Million Monkeys
Strata 2012 Million MonkeysStrata 2012 Million Monkeys
Strata 2012 Million MonkeysJesse Anderson
 
EC2 Performance, Spot Instance ROI and EMR Scalability
EC2 Performance, Spot Instance ROI and EMR ScalabilityEC2 Performance, Spot Instance ROI and EMR Scalability
EC2 Performance, Spot Instance ROI and EMR Scalability
Jesse Anderson
 
Introduction to Regular Expressions
Introduction to Regular ExpressionsIntroduction to Regular Expressions
Introduction to Regular Expressions
Jesse Anderson
 
Why Use MVC?
Why Use MVC?Why Use MVC?
Why Use MVC?
Jesse Anderson
 
How to Use MVC
How to Use MVCHow to Use MVC
How to Use MVC
Jesse Anderson
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to Android
Jesse Anderson
 

More from Jesse Anderson (13)

Managing Real-Time Data Teams
Managing Real-Time Data TeamsManaging Real-Time Data Teams
Managing Real-Time Data Teams
 
Big Data and Analytics in the COVID-19 Era
Big Data and Analytics in the COVID-19 EraBig Data and Analytics in the COVID-19 Era
Big Data and Analytics in the COVID-19 Era
 
Working Together As Data Teams V1
Working Together As Data Teams V1Working Together As Data Teams V1
Working Together As Data Teams V1
 
What Does an Exec Need to About Architecture and Why
What Does an Exec Need to About Architecture and WhyWhat Does an Exec Need to About Architecture and Why
What Does an Exec Need to About Architecture and Why
 
The Five Dysfunctions of a Data Engineering Team
The Five Dysfunctions of a Data Engineering TeamThe Five Dysfunctions of a Data Engineering Team
The Five Dysfunctions of a Data Engineering Team
 
HBaseCon 2014-Just the Basics
HBaseCon 2014-Just the BasicsHBaseCon 2014-Just the Basics
HBaseCon 2014-Just the Basics
 
Million Monkeys User Group
Million Monkeys User GroupMillion Monkeys User Group
Million Monkeys User Group
 
Strata 2012 Million Monkeys
Strata 2012 Million MonkeysStrata 2012 Million Monkeys
Strata 2012 Million Monkeys
 
EC2 Performance, Spot Instance ROI and EMR Scalability
EC2 Performance, Spot Instance ROI and EMR ScalabilityEC2 Performance, Spot Instance ROI and EMR Scalability
EC2 Performance, Spot Instance ROI and EMR Scalability
 
Introduction to Regular Expressions
Introduction to Regular ExpressionsIntroduction to Regular Expressions
Introduction to Regular Expressions
 
Why Use MVC?
Why Use MVC?Why Use MVC?
Why Use MVC?
 
How to Use MVC
How to Use MVCHow to Use MVC
How to Use MVC
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to Android
 

Recently uploaded

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 

Recently uploaded (20)

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 

Pulsar for Kafka People

  • 1. Pulsar For Kafka People 1 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 2. Introducing Pulsar Architectures API and Programming Differences Use Cases Pulsar For Kafka People 2 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 3. Apache Pulsar is a distributed event streaming system Apache Pulsar • It uses a distributed log to durably store messages • Pulsar was originally created at Yahoo • Open sourced in 2016 • Graduated to a top-level Apache project in 2018 3 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 4. Kafka is a distributed publish subscribe system Apache Kafka • It uses a commit log to track changes • Kafka was originally created at LinkedIn • Open sourced in 2011 • Graduated to a top-level Apache project in 2012 4 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 5. Introducing Pulsar Architectures API and Programming Differences Use Cases Pulsar For Kafka People 5 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 6. Basic Kafka Architecture Publisher SubscriberKafka Publisher sends data and doesn't know about the subscribers or their status. Subscriber recieves data from publisher and never directly interacts with it. All interactions go through Kafka and it handles all communication. 6 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 7. Basic Pulsar Architecture Producer ConsumerPulsar Producers do not directly interact with the BookKeeper cluster. Consumers do not directly interact with the BookKeeper cluster. All Brokers in the Pulsar cluster are stateless and can be scaled independently. BookKeeper All Bookies in the BookKeeper cluster are stateful and can be scaled independently. 7 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 8. Kafka Partitions Producer 0 Data is divided into partitions. Partitions are both logical and physical divisions. Producer 1 Topic Partition 0 Partition 1 Partition 2 All data is sent and received on topics. Topics group like data together. 8 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 9. Pulsar Ledgers The individual messages that are produced are stored as records in the ledger. Stream Ledger 1 Ledger 2 Ledger 3 Record 1 Record 2 Record 3 Record 4 Each topic has it's own stream and all data for a topic is stored in it. As more data is added to a topic, new ledgers are allocated to store the data. 9 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 10. Kafka Consumers Producer 0 Consumer recieves data from all topic partitions and connects to brokers 0, 1, and 2. Producer 1 Broker 0 Broker 1 Broker 2 Topic Partition 0 Partition 1 Partition 2 Consumer (P012) 10 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 11. Pulsar Subscriptions Producer 0 In failover, all partitions are consumed by one consumer and will fail over to hot spare on fail. Producer 1 Broker 0 Broker 1 Broker 2 Topic Partition 0 Partition 1 Partition 2 Failover Sub. (P012) Shared Sub. (P012) In shared, messages are sent in a round robin way to all consumers. Shared Sub. (P012) Key Shared (P012) Key Shared (P012) Failover Sub. (P) In key shared, messages with the same key are consistently routed to the same consumer. 11 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 12. Introducing Pulsar Architectures API and Programming Differences Use Cases Pulsar For Kafka People 12 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 13. import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.ProducerRecord; import static org.apache.kafka.clients.producer.ProducerConfig.*; Properties props = new Properties(); // Configure brokers to connect to props.put(BOOTSTRAP_SERVERS_CONFIG, "broker1:9092"); // Create a producer with the key as a string and value as a string KafkaProducer<String, String> producer = new KafkaProducer<>(props, new StringSerializer(), new StringSerializer()); // Create ProducerRecord and send it String key = "mykey"; String value = "myvalue"; ProducerRecord<String, String> record = new ProducerRecord<>("hello_topic", key, value); producer.send(record); producer.close(); Kafka Producer API 13 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 14. PulsarClient client = PulsarClient.builder() .serviceUrl("pulsar://broker1:6650") .build(); // Create a producer that will send values as strings // Default is byte[] Producer<String> producer = client .newProducer(Schema.STRING) .topic("hellotopic") .create(); // Create a new message, send it, and block until it is // acknowledged producer.newMessage() .key("mykey") .value("myvalue") .send(); // Create a new message, send it, and don't block until it is // acknowledged producer.newMessage() .key("mykey2") .value("myvalue2") .sendAsync(); // Close producer and client producer.close(); client.close(); Pulsar Producer API 14 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 15. import org.apache.kafka.clients.consumer.ConsumerRecord; import org.apache.kafka.clients.consumer.ConsumerRecords; import org.apache.kafka.clients.consumer.KafkaConsumer; import static org.apache.kafka.clients.consumer.ConsumerConfig.*; @SuppressWarnings("unused") public class HelloConsumer { KafkaConsumer<String, String> consumer; public void createConsumer() { String topic = "hello_topic"; Properties props = new Properties(); // Configure initial location bootstrap servers props.put(BOOTSTRAP_SERVERS_CONFIG, "broker1:9092"); // Configure consumer group props.put(GROUP_ID_CONFIG, "group1"); // Create the consumer with the key as a string and value as a string consumer = new KafkaConsumer<>(props, new StringDeserializer(), new StringDeserializer()); Kafka Consumer API (1/2) 15 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 16. consumer.subscribe(Arrays.asList(topic)); while (true) { // Poll for ConsumerRecords for a certain amount of time ConsumerRecords<String, String> records = consumer.poll( Duration.ofMillis(100)); // Process the ConsumerRecords, if any, that came back for (ConsumerRecord<String, String> record : records) { String key = record.key(); String value = record.value(); // Do something with message } } } public void close() { consumer.close(); } public static void main(String[] args) { HelloConsumer consumer = new HelloConsumer(); consumer.createConsumer(); consumer.close(); } Kafka Consumer API (2/2) 16 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 17. client = PulsarClient.builder() .serviceUrl("pulsar://broker1:6650") .build(); String myTopic = "hellotopic"; String mySubscriptionName = "my-subscription"; // Create a consumer that will receive values as strings // Default is byte[] consumer = client.newConsumer(Schema.STRING) .topic(myTopic) .subscriptionName(mySubscriptionName) .subscribe(); while (true) { // Block and wait until a single message is available Message<String> message = consumer.receive(); try { // Do something with the message System.out.println("Key is "" + message.getKey() + "" value is "" + message.getValue() + """); // Acknowledge the message so that it can be // deleted by the message broker consumer.acknowledgeCumulative(message); } catch (Exception e) { // Message failed to process, redeliver later consumer.negativeAcknowledge(message); } } Pulsar Consumer API 17 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 18. Both projects have an ecosystem associated with them Ecosystem Projects • Kafka Streams -> Pulsar Functions • KSQLDB (prop) -> Pulsar SQL • Kafka Connect -> Pulsar IO • Kafka API compatibility for Pulsar 18 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 19. Introducing Pulsar Architectures API and Programming Differences Use Cases Pulsar For Kafka People 19 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 20. Kafka++ All Kafka use cases plus more 20 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 21. Work Queues http://tiny.bdi.io/workqueues 21 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 22. Geo-Replication Built-in geo-replication 22 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 23. Unified Do both MQ-style and Pub/Sub-style with the same cluster 23 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 24. Lots of Topics Supports millions of topics 24 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9
  • 25. Thank You bigdatainstitute.io 25 / 25Copyright © 2020 Smoking Hand LLC. All rights Reserved. Version: 82982da9