SlideShare a Scribd company logo
Pulsar Virtual Summit North America 2021
Exactly-Once Made Easy:
Transactional Messaging
in Apache Pulsar
Sijie Guo
Co-Founder and CEO @ StreamNative
Addison Higham
Chief Architect @ StreamNative
Pulsar Virtual Summit North America 2021
Who are we?
● Sijie Guo (@sijieg)
● CEO, StreamNative
● PMC Member of Pulsar/BookKeeper
● Ex-Streamlio, Ex-Twitter
● Addison Higham (@addisonjh)
● Chief Architect, StreamNative
● Pulsar Committer
● Formerly Architect at Instructure
Pulsar Virtual Summit North America 2021
StreamNative
Founded by the creators of Apache Pulsar, StreamNative provides a
cloud-native, unified messaging and streaming platform powered by
Apache Pulsar to support multi-cloud and hybrid-cloud strategies
Messaging Semantics
✓ At-most once
✓ At-least once
✓ Exactly once
Messaging Semantics
✓ At-most once
✓ At-least once
✓ Exactly once
Since Pulsar was released
Messaging Semantics
✓ At-most once
✓ At-least once
✓ Exactly once
Idempotent Producer - 1.20.0-incubating
(PIP-6: Guaranteed Message Deduplication)
Pulsar Virtual Summit North America 2021
Revisit Existing Semantics
Pulsar’s Existing Semantics
Producer Broker Topic (Log)
send(m1)
Pulsar’s Existing Semantics
Producer Broker Topic (Log)
append(m1)
Pulsar’s Existing Semantics
Producer Broker Topic (Log)
m1
Pulsar’s Existing Semantics
Producer Broker Topic (Log)
m1
ack(m1)
Pulsar’s Existing Semantics
Producer Broker Topic (Log)
m1
ack(m1)
Pulsar’s Existing Semantics
Producer Broker Topic (Log)
send(m2)
m1
Pulsar’s Existing Semantics
Producer Broker Topic (Log)
append(m2)
m1
Pulsar’s Existing Semantics
Producer Broker Topic (Log)
m1
m2
ack(m2)
Pulsar’s Existing Semantics
Producer Broker Topic (Log)
m1
m2
ack(m2)
Pulsar’s Existing Semantics
Producer Broker Topic (Log)
m1
m2
ack(m2)
What do we do now?
At-least Once: Resend (m2)
Producer Broker Topic (Log)
m1
m2
send(m2)
At-least Once: Resend (m2)
Producer Broker Topic (Log)
m1
m2
append(m2)
At-least Once: Resend (m2)
Producer Broker Topic (Log)
m1
m2
m2
Duplicates!!
Why the duplicates are introduced?
✓ Broker can fail
✓ The request from Producer to Broker can fail
✓ Producer or Consumer can fail
At-most Once: Don’t resend
Producer Broker Topic (Log)
m1
m2
I want exactly-once
Message Deduplication
✓ Producer: Idempotent Producer
✓ Broker: Guaranteed Message Deduplication (PIP-6)
✓ Consumer: Reader + Checkpoints (Flink / Spark)
Idempotent Producer
✓ Producer Name - Identify who is producing the messages
✓ Sequence ID: Identify the message
✓ Producer Name + Sequence ID: The unique identifier for a message
Guaranteed Message Deduplication
✓ Broker maintains a map between Producer Name and last
produced sequence ID
✓ Broker accepts a message if its sequence ID is larger than the last
produced sequence ID
✓ Broker discards a message whose sequence ID is smaller than the
last produced Sequence ID
✓ Broker keeps a map between Producer Name and last Sequence ID
in a deduplication cursor (stored in Apache BookKeeper)
Exactly Once
Producer Broker Topic (Log)
send(1, m1)
Exactly Once Producer
Producer Broker Topic (Log)
append(1, m1)
1,
m1
Exactly Once Producer
Producer Broker Topic (Log)
append(2, m2)
1,
m1
2,
m2
Exactly Once Producer
Producer Broker Topic (Log)
1,
m1
2,
m2
ack(2, m2)
What do we do now?
Exactly Once Producer
Producer Broker Topic (Log)
1,
m1
2,
m2
send(2, m2)
Exactly Once Producer
Producer Broker Topic (Log)
1,
m1
2,
m2
append(2, m2)
Exactly Once Producer
Producer Broker Topic (Log)
1,
m1
2,
m2
append(2, m2)
Duplicate detected
Exactly Once Producer
Producer Broker Topic (Log)
1,
m1
2,
m2
ack(2, m2)
Enable Exactly Once
✓ Enable deduplication: `bin/pulsar-admin namespaces set-
deduplication -e tenant/namespace`
✓ Set producer name when creating a producer
✓ Specify increasing sequence id when producing messages (optional)
Exactly Once Consumer
Consumer Broker Topic (Log)
1,
m1
2,
m2
receive_after(m1)
Last Received: m1
Exactly Once Consumer
Consumer Broker Topic (Log)
1,
m1
2,
m2
dispatch(m2)
Last Received: m2
Limitations
✓ It only works when producing messages to one partition
✓ It only works for producing one message
✓ There is no atomicity when producing multiple messages to one
partition or many partitions
✓ Consumers are required to store the Message ID along with its state
and seek back to the Message ID when restoring the state
Pulsar Virtual Summit North America 2021
Introducing Transactions
PulsarCash
PulsarCash
PulsarCash, powered by Apache Pulsar
✓ Transfer Topic: record all the transfer requests
✓ Cash Transfer Function: perform the cash transfer action
✓ BalanceUpdate Topic: record the balance-update requests
PulsarCash
Transfer Topic
User:bob, credit($10)
BalanceUpdate
Topic
BalanceUpdate
Topic
User:alice, debit($10)
Cash Transfer
Function
(100,0,0): transfer ($10, alice -> bob)
Ack Transfer
Transfer Topic
User:bob, credit($10)
BalanceUpdate
Topic
BalanceUpdate
Topic
User:alice, debit($10)
Cash Transfer
Function
(100,0,0): transfer ($10, alice -> bob)
Ack: (100, 0, 0)
Reprocessed
Transfer!
Transfer Topic
User:bob, credit($10)
BalanceUpdate
Topic
BalanceUpdate
Topic
User:alice, debit($10)
Cash Transfer
Function
(100,0,0): transfer ($10, alice -> bob)
Ack: (100, 0, 0)
Lost Money!
Transfer Topic
User:bob, credit($10)
BalanceUpdate
Topic
BalanceUpdate
Topic
User:alice, debit($10)
Cash Transfer
Function
(100,0,0): transfer ($10, alice -> bob)
Ack: (100, 0, 0)
Pulsar Virtual Summit North America 2021
Pulsar Transaction Explained
Transaction Semantics
✓ Atomic writes across multiple topic partitions
✓ Atomic acknowledgments across multiple topic partitions
✓ All the operations made within one transaction either all succeed or
all fail
✓ Conditional acknowledgement to handle network partition
✓ Consumers are *ONLY* allowed to read committed messages
Without Transaction API
Message<Transfer> tf = inputConsumer.receive();
MessageId msg1 = producer1.newMessage().value(
BalanceTransfer(tf.sender, tf.amount, “debit”)).send();
MessageId msg2 = producer2.newMessage().value(
BalanceTransfer(tf.receiver, tf.amount, “credit”)).send();
inputConsumer.acknowledge(tf.getMessageId());
Pulsar Client
Cursor
Input Topic Output Topic 1 Output Topic 2
Broker 0 Broker 1
Input
Consumer
Producer 1 Producer 2
1) Receive Message 2) Produce Messages
3) Ack Message
Transaction API
Message<Transfer> message = inputConsumer.receive();
Transaction txn =
client.newTransaction().withTransactionTimeout(...).build().get();
MessageId msg1 = producer1.newMessage(txn).value(
BalanceTransfer(tf.sender, tf.amount, “debit”)).send;
MessageId msg2 = producer2.newMessage(txn).value(
BalanceTransfer(tf.receiver, tf.amount, “credit”)).send();
inputConsumer.acknowledge(message.getMessageId(), txn);
txn.commit().get();
Pulsar Client
Cursor
Input Topic Output Topic 1 Output Topic 2
Broker 0 Broker 1
Input
Consumer
Producer 1 Producer 2
Coordinator
Transaction Log
Txn
Buffer
Txn
Buffer
Pulsar Client
Cursor
Input Topic Output Topic 1 Output Topic 2
Broker 0 Broker 1
Input
Consumer
Producer 1 Producer 2
Coordinator
Transaction Log
Txn
Buffer
Txn
Buffer
Transaction Coordinator (TC)
✓ TC: Transaction manager, coordinating committing and aborting
transactions
✓ In-Memory + Transaction Log
✓ Transaction Log is powered by a partitioned Pulsar topic
✓ Locating a TC is locating a partition of the transaction log topic
Pulsar Client
Cursor
Input Topic Output Topic 1 Output Topic 2
Broker 0 Broker 1
Input
Consumer
Producer 1 Producer 2
Coordinator
Transaction Log
Txn
Buffer
Txn
Buffer
Transaction Buffer (TB)
✓ TB: store and index transaction data (per topic partition)
✓ TB is implemented using another managed-ledger (ML)
✓ Transactional messages are appended to TB
✓ Transaction index is maintained in memory and snapshotted to
ledgers
✓ Transaction index can be rebuilt from TB
Pulsar Client
Cursor
Input Topic Output Topic 1 Output Topic 2
Broker 0 Broker 1
Input
Consumer
Producer 1 Producer 2
Coordinator
Transaction Log
Txn
Buffer
Txn
Buffer
Transactional Subscription State (TSS)
✓ Introduce ACK_PENDING state
✓ Add response for acknowledgment, aka Ack-on-Ack
✓ Acknowledgment state is updated to cursor ledger
✓ Acknowledgment state can be replayed from cursor ledger
Pulsar Virtual Summit North America 2021
Transaction Execution Flow
Transaction API
Message<Transfer> message = inputConsumer.receive();
Transaction txn =
client.newTransaction().withTransactionTimeout(...).build().get();
MessageId msg1 = producer1.newMessage(txn).value(
BalanceTransfer(tf.sender, tf.amount, “debit”)).send;
MessageId msg2 = producer2.newMessage(txn).value(
BalanceTransfer(tf.receiver, tf.amount, “credit”)).send();
inputConsumer.acknowledge(message.getMessageId(), txn);
txn.commit().get();
Pulsar Client
Cursor
Input Topic Output Topic 1 Output Topic 2
Broker 0 Broker 1
Input
Consumer
Producer 2
Coordinator
Transaction Log
Txn
Buffer
Txn
Buffer
Txn
New Txn
Producer 1
Tx1
1. New Txn
Transaction API
Message<Transfer> message = inputConsumer.receive();
Transaction txn =
client.newTransaction().withTransactionTimeout(...).build().get();
MessageId msg1 = producer1.newMessage(txn).value(
BalanceTransfer(tf.sender, tf.amount, “debit”)).send;
MessageId msg2 = producer2.newMessage(txn).value(
BalanceTransfer(tf.receiver, tf.amount, “credit”)).send();
inputConsumer.acknowledge(message.getMessageId(), txn);
txn.commit().get();
Pulsar Client
Cursor
Input Topic Output Topic 1 Output Topic 2
Broker 0 Broker 1
Input
Consumer
Producer 2
Coordinator
Transaction Log
Txn
Buffer
Txn
Buffer
Txn
New Txn
Producer 1
Tx1
Tx1: add [T1, T2] Tx1: M1 Tx1: M2
2.2 Produced Messages To
Topics with Txn
2.1 Add Produced
Topics To Txn
Transaction API
Message<Transfer> message = inputConsumer.receive();
Transaction txn =
client.newTransaction().withTransactionTimeout(...).build().get();
MessageId msg1 = producer1.newMessage(txn).value(
BalanceTransfer(tf.sender, tf.amount, “debit”)).send;
MessageId msg2 = producer2.newMessage(txn).value(
BalanceTransfer(tf.receiver, tf.amount, “credit”)).send();
inputConsumer.acknowledge(message.getMessageId(), txn);
txn.commit().get();
Pulsar Client
Cursor
Input Topic Output Topic 1 Output Topic 2
Broker 0 Broker 1
Input
Consumer
Producer 2
Coordinator
Transaction Log
Txn
Buffer
Txn
Buffer
Txn
New Txn
Producer 1
Tx1
Tx1: add [T1, T2] Tx1: M1 Tx1: M2
3.1 Add Acked
Subscriptions to Txn
Tx1: ACK (M0)
3.2 Ack messages with Txn
Tx1: add [S0]
Transaction API
Message<Transfer> message = inputConsumer.receive();
Transaction txn =
client.newTransaction().withTransactionTimeout(...).build().get();
MessageId msg1 = producer1.newMessage(txn).value(
BalanceTransfer(tf.sender, tf.amount, “debit”)).send;
MessageId msg2 = producer2.newMessage(txn).value(
BalanceTransfer(tf.receiver, tf.amount, “credit”)).send();
inputConsumer.acknowledge(message.getMessageId(), txn);
txn.commit().get();
Pulsar Client
Cursor
Input Topic Output Topic 1 Output Topic 2
Broker 0 Broker 1
Input
Consumer
Producer 2
Coordinator
Transaction Log
Txn
Buffer
Txn
Buffer
Txn
New Txn
Producer 1
Tx1
Tx1: add [T1, T2] Tx1: M1 Tx1: M2
4.0 Commit Txn
Tx1: ACK (M0)
Tx1: add [S0]
4.0.1 Committing Txn
Tx1: Committing
Pulsar Client
Cursor
Input Topic Output Topic 1 Output Topic 2
Broker 0 Broker 1
Input
Consumer
Producer 2
Coordinator
Transaction Log
Txn
Buffer
Txn
Buffer
Txn
New Txn
Producer 1
Tx1
Tx1: add [T1, T2] Tx1: M1 Tx1: M2
Tx1: ACK (M0)
Tx1: add [S0]
Tx1: Committing
Tx1: Committed Tx1: (c) Tx1: (c)
4.1.1 Commit Txn
on Subscriptions
4.1.0 Commit Txn
on Topics
Pulsar Client
Cursor
Input Topic Output Topic 1 Output Topic 2
Broker 0 Broker 1
Input
Consumer
Producer 2
Coordinator
Transaction Log
Txn
Buffer
Txn
Buffer
Txn
New Txn
Producer 1
Tx1
Tx1: add [T1, T2] Tx1: M1 Tx1: M2
Tx1: ACK (M0)
Tx1: add [S0]
Tx1: Committing
Tx1: Committed
Tx1: Committed Tx1: (c) Tx1: (c)
4.2 Commit Txn
Pulsar Virtual Summit North America 2021
Failure Handling in Transaction
Pulsar Client
Cursor
Input Topic Output Topic 1 Output Topic 2
Broker 0 Broker 1
Input
Consumer
Producer 2
Coordinator
Transaction Log
Txn
Buffer
Txn
Buffer
Txn
New Txn
Producer 1
Tx1
1. New Txn
Pulsar Client
Cursor
Input Topic Output Topic 1 Output Topic 2
Broker 0 Broker 1
Input
Consumer
Producer 2
Coordinator
Transaction Log
Txn
Buffer
Txn
Buffer
Txn
New Txn
Producer 1
Tx1
Tx1: add [T1, T2] Tx1: M1 Tx1: M2
2.2 Produced Messages To
Topics with Txn
2.1 Add Produced
Topics To Txn
Pulsar Client
Cursor
Input Topic Output Topic 1 Output Topic 2
Broker 0 Broker 1
Input
Consumer
Producer 2
Coordinator
Transaction Log
Txn
Buffer
Txn
Buffer
Txn
New Txn
Producer 1
Tx1
Tx1: add [T1, T2] Tx1: M1 Tx1: M2
3.1 Add Acked
Subscriptions to Txn
Tx1: ACK (M0)
3.2 Ack messages with Txn
Tx1: add [S0]
Pulsar Client
Cursor
Input Topic Output Topic 1 Output Topic 2
Broker 0 Broker 1
Input
Consumer
Producer 2
Coordinator
Transaction Log
Txn
Buffer
Txn
Buffer
Txn
New Txn
Producer 1
Tx1
Tx1: add [T1, T2] Tx1: M1 Tx1: M2
Tx1: ACK (M0)
Tx1: add [S0]
Tx1: Committing
Tx1: Committed Tx1: (c) Tx1: (c)
4.1.1 Commit Txn
on Subscriptions
4.1.0 Commit Txn
on Topics
Transaction API - Async Example
inputConsumer.receiveAsync.thenCompose(tf -> {
return
client.newTransaction().withTransactionTimeout(...).build().thenCompose(txn ->{
producer1.newMessage(txn).value(BalanceTransfer(...)).sendAsync();
producer2.newMessage(txn).value(BalacneTransfer(...)).sendAsync();
inputConsumer.acknowledgeAsync(tf.getMessageId(), txn);
return txn.commit();
});
});
PulsarCash
Transfer Topic
User:bob, credit($10)
BalanceUpdate
Topic
BalanceUpdate
Topic
User:alice, debit($10)
Cash Transfer
Function
(100,0,0): transfer ($10, alice -> bob)
Ack: (100, 0, 0)
PulsarCash
Transfer Topic
User:bob, credit($10)
BalanceUpdate
Topic
BalanceUpdate
Topic
User:alice, debit($10)
Cash Transfer
Function
(100,0,0): transfer ($10, alice -> bob)
Ack: (100, 0, 0)
Transaction
Pulsar Virtual Summit North America 2021
Pulsar Transaction
Makes Messaging and Streaming
easy and reliable for everyone
What’s Next
✓ Transaction Support in other languages (e.g. C++, Go)
✓ Transaction in Pulsar Functions & Pulsar IO
✓ Transaction in Kafka-on-Pulsar, AMQP-on-Pulsar, MQTT-on-Pulsar
✓ Transaction with State Storage in Pulsar Functions
✓ ...
Credits
✓ Developers: Penghui, Bo Cong, Ran Gao, Yong Zhang, Marvin Cai
✓ Reviewers: Jia Zhai, Matteo Merli, Addison Higham, Sijie Guo
✓ … and many other Pulsar users & contributors
Try Pulsar Transaction today!
✓ GA Release: 2.8.0
✓ Try it today!
✓ StreamNative Cloud - Fully managed SaaS service
✓ StreamNative Platform - Self-managed enterprise software
StreamNative Platform
Self-managed enterprise offering of Pulsar
✓ Kafka-on-Pulsar
✓ Function Mesh for serverless streaming
✓ Enterprise-ready security
✓ Pulsar Operators
✓ Seamless StreamNative Cloud
experience
https://streamnative.io/platform
StreamNative Cloud
Fully-managed Pulsar-as-a-Service
✓ Massive scale without the ops overhead
✓ Built for hybrid and multi-cloud
✓ Cloud-Hosted & Cloud-Managed
✓ Stream across public clouds for multi-
cloud applications
✓ Elastic, consumption-based pricing with
‘pay as you go’ model
✓ Reliably scale mission-critical apps
https://streamnative.io/cloud
We’re hiring
Build Pulsar with the team that builds Pulsar
✓ Work with the creators of Pulsar
✓ Exciting, growth-stage company
✓ Open and collaborative environment
✓ Competitive compensation and benefits
✓ Best teammates on earth
https://streamnative.io/careers

More Related Content

What's hot

Apache Kafka - Martin Podval
Apache Kafka - Martin PodvalApache Kafka - Martin Podval
Apache Kafka - Martin Podval
Martin Podval
 
RabbitMQ & Kafka
RabbitMQ & KafkaRabbitMQ & Kafka
RabbitMQ & Kafka
VMware Tanzu
 
Airflow presentation
Airflow presentationAirflow presentation
Airflow presentation
Anant Corporation
 
Effectively-once semantics in Apache Pulsar
Effectively-once semantics in Apache PulsarEffectively-once semantics in Apache Pulsar
Effectively-once semantics in Apache Pulsar
Matteo Merli
 
Apache Airflow Introduction
Apache Airflow IntroductionApache Airflow Introduction
Apache Airflow Introduction
Liangjun Jiang
 
Netflix Data Pipeline With Kafka
Netflix Data Pipeline With KafkaNetflix Data Pipeline With Kafka
Netflix Data Pipeline With Kafka
Allen (Xiaozhong) Wang
 
Distributed Databases Deconstructed: CockroachDB, TiDB and YugaByte DB
Distributed Databases Deconstructed: CockroachDB, TiDB and YugaByte DBDistributed Databases Deconstructed: CockroachDB, TiDB and YugaByte DB
Distributed Databases Deconstructed: CockroachDB, TiDB and YugaByte DB
YugabyteDB
 
Deploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and KubernetesDeploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and Kubernetes
confluent
 
Kafka 101
Kafka 101Kafka 101
Kafka 101
Aparna Pillai
 
Apache Airflow
Apache AirflowApache Airflow
Apache Airflow
Sumit Maheshwari
 
Hive User Meeting August 2009 Facebook
Hive User Meeting August 2009 FacebookHive User Meeting August 2009 Facebook
Hive User Meeting August 2009 Facebook
ragho
 
Making Apache Spark Better with Delta Lake
Making Apache Spark Better with Delta LakeMaking Apache Spark Better with Delta Lake
Making Apache Spark Better with Delta Lake
Databricks
 
Paris Kafka Meetup - Concepts & Architecture
Paris Kafka Meetup - Concepts & ArchitectureParis Kafka Meetup - Concepts & Architecture
Paris Kafka Meetup - Concepts & Architecture
Florian Hussonnois
 
An Introduction to Apache Kafka
An Introduction to Apache KafkaAn Introduction to Apache Kafka
An Introduction to Apache Kafka
Amir Sedighi
 
Stream processing using Kafka
Stream processing using KafkaStream processing using Kafka
Stream processing using Kafka
Knoldus Inc.
 
Highly Available Kafka Consumers and Kafka Streams on Kubernetes with Adrian ...
Highly Available Kafka Consumers and Kafka Streams on Kubernetes with Adrian ...Highly Available Kafka Consumers and Kafka Streams on Kubernetes with Adrian ...
Highly Available Kafka Consumers and Kafka Streams on Kubernetes with Adrian ...
HostedbyConfluent
 
Apache Kafka
Apache KafkaApache Kafka
Apache Kafka
emreakis
 
Extending Flink SQL for stream processing use cases
Extending Flink SQL for stream processing use casesExtending Flink SQL for stream processing use cases
Extending Flink SQL for stream processing use cases
Flink Forward
 
Deploying PostgreSQL on Kubernetes
Deploying PostgreSQL on KubernetesDeploying PostgreSQL on Kubernetes
Deploying PostgreSQL on Kubernetes
Jimmy Angelakos
 
Envoy and Kafka
Envoy and KafkaEnvoy and Kafka
Envoy and Kafka
Adam Kotwasinski
 

What's hot (20)

Apache Kafka - Martin Podval
Apache Kafka - Martin PodvalApache Kafka - Martin Podval
Apache Kafka - Martin Podval
 
RabbitMQ & Kafka
RabbitMQ & KafkaRabbitMQ & Kafka
RabbitMQ & Kafka
 
Airflow presentation
Airflow presentationAirflow presentation
Airflow presentation
 
Effectively-once semantics in Apache Pulsar
Effectively-once semantics in Apache PulsarEffectively-once semantics in Apache Pulsar
Effectively-once semantics in Apache Pulsar
 
Apache Airflow Introduction
Apache Airflow IntroductionApache Airflow Introduction
Apache Airflow Introduction
 
Netflix Data Pipeline With Kafka
Netflix Data Pipeline With KafkaNetflix Data Pipeline With Kafka
Netflix Data Pipeline With Kafka
 
Distributed Databases Deconstructed: CockroachDB, TiDB and YugaByte DB
Distributed Databases Deconstructed: CockroachDB, TiDB and YugaByte DBDistributed Databases Deconstructed: CockroachDB, TiDB and YugaByte DB
Distributed Databases Deconstructed: CockroachDB, TiDB and YugaByte DB
 
Deploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and KubernetesDeploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and Kubernetes
 
Kafka 101
Kafka 101Kafka 101
Kafka 101
 
Apache Airflow
Apache AirflowApache Airflow
Apache Airflow
 
Hive User Meeting August 2009 Facebook
Hive User Meeting August 2009 FacebookHive User Meeting August 2009 Facebook
Hive User Meeting August 2009 Facebook
 
Making Apache Spark Better with Delta Lake
Making Apache Spark Better with Delta LakeMaking Apache Spark Better with Delta Lake
Making Apache Spark Better with Delta Lake
 
Paris Kafka Meetup - Concepts & Architecture
Paris Kafka Meetup - Concepts & ArchitectureParis Kafka Meetup - Concepts & Architecture
Paris Kafka Meetup - Concepts & Architecture
 
An Introduction to Apache Kafka
An Introduction to Apache KafkaAn Introduction to Apache Kafka
An Introduction to Apache Kafka
 
Stream processing using Kafka
Stream processing using KafkaStream processing using Kafka
Stream processing using Kafka
 
Highly Available Kafka Consumers and Kafka Streams on Kubernetes with Adrian ...
Highly Available Kafka Consumers and Kafka Streams on Kubernetes with Adrian ...Highly Available Kafka Consumers and Kafka Streams on Kubernetes with Adrian ...
Highly Available Kafka Consumers and Kafka Streams on Kubernetes with Adrian ...
 
Apache Kafka
Apache KafkaApache Kafka
Apache Kafka
 
Extending Flink SQL for stream processing use cases
Extending Flink SQL for stream processing use casesExtending Flink SQL for stream processing use cases
Extending Flink SQL for stream processing use cases
 
Deploying PostgreSQL on Kubernetes
Deploying PostgreSQL on KubernetesDeploying PostgreSQL on Kubernetes
Deploying PostgreSQL on Kubernetes
 
Envoy and Kafka
Envoy and KafkaEnvoy and Kafka
Envoy and Kafka
 

Similar to Exactly-Once Made Easy: Transactional Messaging in Apache Pulsar - Pulsar Summit NA 2021

Transaction preview of Apache Pulsar
Transaction preview of Apache PulsarTransaction preview of Apache Pulsar
Transaction preview of Apache Pulsar
StreamNative
 
Transaction Support in Pulsar 2.5.0
Transaction Support in Pulsar 2.5.0Transaction Support in Pulsar 2.5.0
Transaction Support in Pulsar 2.5.0
StreamNative
 
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
 
Kafka 101 and Developer Best Practices
Kafka 101 and Developer Best PracticesKafka 101 and Developer Best Practices
Kafka 101 and Developer Best Practices
confluent
 
JConf.dev 2022 - Apache Pulsar Development 101 with Java
JConf.dev 2022 - Apache Pulsar Development 101 with JavaJConf.dev 2022 - Apache Pulsar Development 101 with Java
JConf.dev 2022 - Apache Pulsar Development 101 with Java
Timothy Spann
 
Optimizing MongoDB: Lessons Learned at Localytics
Optimizing MongoDB: Lessons Learned at LocalyticsOptimizing MongoDB: Lessons Learned at Localytics
Optimizing MongoDB: Lessons Learned at Localytics
Benjamin Darfler
 
Apache Pulsar Development 101 with Python
Apache Pulsar Development 101 with PythonApache Pulsar Development 101 with Python
Apache Pulsar Development 101 with Python
Timothy Spann
 
Integrating Xtext Language Server support in Visual Studio Code
Integrating Xtext Language Server support in Visual Studio CodeIntegrating Xtext Language Server support in Visual Studio Code
Integrating Xtext Language Server support in Visual Studio Code
Karsten Thoms
 
BigQuery case study in Groovenauts & Dive into the DataflowJavaSDK
BigQuery case study in Groovenauts & Dive into the DataflowJavaSDKBigQuery case study in Groovenauts & Dive into the DataflowJavaSDK
BigQuery case study in Groovenauts & Dive into the DataflowJavaSDK
nagachika t
 
Real-World Pulsar Architectural Patterns
Real-World Pulsar Architectural PatternsReal-World Pulsar Architectural Patterns
Real-World Pulsar Architectural Patterns
Devin Bost
 
Kafka streams decoupling with stores
Kafka streams decoupling with storesKafka streams decoupling with stores
Kafka streams decoupling with stores
Yoni Farin
 
No REST - Architecting Real-time Bulk Async APIs
No REST - Architecting Real-time Bulk Async APIsNo REST - Architecting Real-time Bulk Async APIs
No REST - Architecting Real-time Bulk Async APIs
C4Media
 
Apache Kafka, and the Rise of Stream Processing
Apache Kafka, and the Rise of Stream ProcessingApache Kafka, and the Rise of Stream Processing
Apache Kafka, and the Rise of Stream Processing
Guozhang Wang
 
초보 개발자도 바로 따라할 수 있는 AWS 미디어 서비스를 이용한 Live/VOD 서비스 구축 – 현륜식 AWS 솔루션즈 아키텍트:: A...
초보 개발자도 바로 따라할 수 있는 AWS 미디어 서비스를 이용한 Live/VOD 서비스 구축 – 현륜식 AWS  솔루션즈 아키텍트:: A...초보 개발자도 바로 따라할 수 있는 AWS 미디어 서비스를 이용한 Live/VOD 서비스 구축 – 현륜식 AWS  솔루션즈 아키텍트:: A...
초보 개발자도 바로 따라할 수 있는 AWS 미디어 서비스를 이용한 Live/VOD 서비스 구축 – 현륜식 AWS 솔루션즈 아키텍트:: A...
Amazon Web Services Korea
 
Machine Intelligence Guild_ Build ML Enhanced Event Streaming Applications wi...
Machine Intelligence Guild_ Build ML Enhanced Event Streaming Applications wi...Machine Intelligence Guild_ Build ML Enhanced Event Streaming Applications wi...
Machine Intelligence Guild_ Build ML Enhanced Event Streaming Applications wi...
Timothy Spann
 
Synapse 2018 Guarding against failure in a hundred step pipeline
Synapse 2018 Guarding against failure in a hundred step pipelineSynapse 2018 Guarding against failure in a hundred step pipeline
Synapse 2018 Guarding against failure in a hundred step pipeline
Calvin French-Owen
 
Fraud Detection for Israel BigThings Meetup
Fraud Detection  for Israel BigThings MeetupFraud Detection  for Israel BigThings Meetup
Fraud Detection for Israel BigThings Meetup
Gwen (Chen) Shapira
 
Logging for Production Systems in The Container Era
Logging for Production Systems in The Container EraLogging for Production Systems in The Container Era
Logging for Production Systems in The Container Era
Sadayuki Furuhashi
 
From a Kafkaesque Story to The Promised Land at LivePerson
From a Kafkaesque Story to The Promised Land at LivePersonFrom a Kafkaesque Story to The Promised Land at LivePerson
From a Kafkaesque Story to The Promised Land at LivePerson
LivePerson
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
loodse
 

Similar to Exactly-Once Made Easy: Transactional Messaging in Apache Pulsar - Pulsar Summit NA 2021 (20)

Transaction preview of Apache Pulsar
Transaction preview of Apache PulsarTransaction preview of Apache Pulsar
Transaction preview of Apache Pulsar
 
Transaction Support in Pulsar 2.5.0
Transaction Support in Pulsar 2.5.0Transaction Support in Pulsar 2.5.0
Transaction Support in Pulsar 2.5.0
 
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
 
Kafka 101 and Developer Best Practices
Kafka 101 and Developer Best PracticesKafka 101 and Developer Best Practices
Kafka 101 and Developer Best Practices
 
JConf.dev 2022 - Apache Pulsar Development 101 with Java
JConf.dev 2022 - Apache Pulsar Development 101 with JavaJConf.dev 2022 - Apache Pulsar Development 101 with Java
JConf.dev 2022 - Apache Pulsar Development 101 with Java
 
Optimizing MongoDB: Lessons Learned at Localytics
Optimizing MongoDB: Lessons Learned at LocalyticsOptimizing MongoDB: Lessons Learned at Localytics
Optimizing MongoDB: Lessons Learned at Localytics
 
Apache Pulsar Development 101 with Python
Apache Pulsar Development 101 with PythonApache Pulsar Development 101 with Python
Apache Pulsar Development 101 with Python
 
Integrating Xtext Language Server support in Visual Studio Code
Integrating Xtext Language Server support in Visual Studio CodeIntegrating Xtext Language Server support in Visual Studio Code
Integrating Xtext Language Server support in Visual Studio Code
 
BigQuery case study in Groovenauts & Dive into the DataflowJavaSDK
BigQuery case study in Groovenauts & Dive into the DataflowJavaSDKBigQuery case study in Groovenauts & Dive into the DataflowJavaSDK
BigQuery case study in Groovenauts & Dive into the DataflowJavaSDK
 
Real-World Pulsar Architectural Patterns
Real-World Pulsar Architectural PatternsReal-World Pulsar Architectural Patterns
Real-World Pulsar Architectural Patterns
 
Kafka streams decoupling with stores
Kafka streams decoupling with storesKafka streams decoupling with stores
Kafka streams decoupling with stores
 
No REST - Architecting Real-time Bulk Async APIs
No REST - Architecting Real-time Bulk Async APIsNo REST - Architecting Real-time Bulk Async APIs
No REST - Architecting Real-time Bulk Async APIs
 
Apache Kafka, and the Rise of Stream Processing
Apache Kafka, and the Rise of Stream ProcessingApache Kafka, and the Rise of Stream Processing
Apache Kafka, and the Rise of Stream Processing
 
초보 개발자도 바로 따라할 수 있는 AWS 미디어 서비스를 이용한 Live/VOD 서비스 구축 – 현륜식 AWS 솔루션즈 아키텍트:: A...
초보 개발자도 바로 따라할 수 있는 AWS 미디어 서비스를 이용한 Live/VOD 서비스 구축 – 현륜식 AWS  솔루션즈 아키텍트:: A...초보 개발자도 바로 따라할 수 있는 AWS 미디어 서비스를 이용한 Live/VOD 서비스 구축 – 현륜식 AWS  솔루션즈 아키텍트:: A...
초보 개발자도 바로 따라할 수 있는 AWS 미디어 서비스를 이용한 Live/VOD 서비스 구축 – 현륜식 AWS 솔루션즈 아키텍트:: A...
 
Machine Intelligence Guild_ Build ML Enhanced Event Streaming Applications wi...
Machine Intelligence Guild_ Build ML Enhanced Event Streaming Applications wi...Machine Intelligence Guild_ Build ML Enhanced Event Streaming Applications wi...
Machine Intelligence Guild_ Build ML Enhanced Event Streaming Applications wi...
 
Synapse 2018 Guarding against failure in a hundred step pipeline
Synapse 2018 Guarding against failure in a hundred step pipelineSynapse 2018 Guarding against failure in a hundred step pipeline
Synapse 2018 Guarding against failure in a hundred step pipeline
 
Fraud Detection for Israel BigThings Meetup
Fraud Detection  for Israel BigThings MeetupFraud Detection  for Israel BigThings Meetup
Fraud Detection for Israel BigThings Meetup
 
Logging for Production Systems in The Container Era
Logging for Production Systems in The Container EraLogging for Production Systems in The Container Era
Logging for Production Systems in The Container Era
 
From a Kafkaesque Story to The Promised Land at LivePerson
From a Kafkaesque Story to The Promised Land at LivePersonFrom a Kafkaesque Story to The Promised Land at LivePerson
From a Kafkaesque Story to The Promised Land at LivePerson
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 

More from StreamNative

Is Using KoP (Kafka-on-Pulsar) a Good Idea? - Pulsar Summit SF 2022
Is Using KoP (Kafka-on-Pulsar) a Good Idea? - Pulsar Summit SF 2022Is Using KoP (Kafka-on-Pulsar) a Good Idea? - Pulsar Summit SF 2022
Is Using KoP (Kafka-on-Pulsar) a Good Idea? - Pulsar Summit SF 2022
StreamNative
 
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
StreamNative
 
Blue-green deploys with Pulsar & Envoy in an event-driven microservice ecosys...
Blue-green deploys with Pulsar & Envoy in an event-driven microservice ecosys...Blue-green deploys with Pulsar & Envoy in an event-driven microservice ecosys...
Blue-green deploys with Pulsar & Envoy in an event-driven microservice ecosys...
StreamNative
 
Distributed Database Design Decisions to Support High Performance Event Strea...
Distributed Database Design Decisions to Support High Performance Event Strea...Distributed Database Design Decisions to Support High Performance Event Strea...
Distributed Database Design Decisions to Support High Performance Event Strea...
StreamNative
 
Simplify Pulsar Functions Development with SQL - Pulsar Summit SF 2022
Simplify Pulsar Functions Development with SQL - Pulsar Summit SF 2022Simplify Pulsar Functions Development with SQL - Pulsar Summit SF 2022
Simplify Pulsar Functions Development with SQL - Pulsar Summit SF 2022
StreamNative
 
Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022
Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022
Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022
StreamNative
 
Validating Apache Pulsar’s Behavior under Failure Conditions - Pulsar Summit ...
Validating Apache Pulsar’s Behavior under Failure Conditions - Pulsar Summit ...Validating Apache Pulsar’s Behavior under Failure Conditions - Pulsar Summit ...
Validating Apache Pulsar’s Behavior under Failure Conditions - Pulsar Summit ...
StreamNative
 
Cross the Streams! Creating Streaming Data Pipelines with Apache Flink + Apac...
Cross the Streams! Creating Streaming Data Pipelines with Apache Flink + Apac...Cross the Streams! Creating Streaming Data Pipelines with Apache Flink + Apac...
Cross the Streams! Creating Streaming Data Pipelines with Apache Flink + Apac...
StreamNative
 
Message Redelivery: An Unexpected Journey - Pulsar Summit SF 2022
Message Redelivery: An Unexpected Journey - Pulsar Summit SF 2022Message Redelivery: An Unexpected Journey - Pulsar Summit SF 2022
Message Redelivery: An Unexpected Journey - Pulsar Summit SF 2022
StreamNative
 
Unlocking the Power of Lakehouse Architectures with Apache Pulsar and Apache ...
Unlocking the Power of Lakehouse Architectures with Apache Pulsar and Apache ...Unlocking the Power of Lakehouse Architectures with Apache Pulsar and Apache ...
Unlocking the Power of Lakehouse Architectures with Apache Pulsar and Apache ...
StreamNative
 
Understanding Broker Load Balancing - Pulsar Summit SF 2022
Understanding Broker Load Balancing - Pulsar Summit SF 2022Understanding Broker Load Balancing - Pulsar Summit SF 2022
Understanding Broker Load Balancing - Pulsar Summit SF 2022
StreamNative
 
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
StreamNative
 
Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
StreamNative
 
Event-Driven Applications Done Right - Pulsar Summit SF 2022
Event-Driven Applications Done Right - Pulsar Summit SF 2022Event-Driven Applications Done Right - Pulsar Summit SF 2022
Event-Driven Applications Done Right - Pulsar Summit SF 2022
StreamNative
 
Pulsar @ Scale. 200M RPM and 1K instances - Pulsar Summit SF 2022
Pulsar @ Scale. 200M RPM and 1K instances - Pulsar Summit SF 2022Pulsar @ Scale. 200M RPM and 1K instances - Pulsar Summit SF 2022
Pulsar @ Scale. 200M RPM and 1K instances - Pulsar Summit SF 2022
StreamNative
 
Data Democracy: Journey to User-Facing Analytics - Pulsar Summit SF 2022
Data Democracy: Journey to User-Facing Analytics - Pulsar Summit SF 2022Data Democracy: Journey to User-Facing Analytics - Pulsar Summit SF 2022
Data Democracy: Journey to User-Facing Analytics - Pulsar Summit SF 2022
StreamNative
 
Beam + Pulsar: Powerful Stream Processing at Scale - Pulsar Summit SF 2022
Beam + Pulsar: Powerful Stream Processing at Scale - Pulsar Summit SF 2022Beam + Pulsar: Powerful Stream Processing at Scale - Pulsar Summit SF 2022
Beam + Pulsar: Powerful Stream Processing at Scale - Pulsar Summit SF 2022
StreamNative
 
Welcome and Opening Remarks - Pulsar Summit SF 2022
Welcome and Opening Remarks - Pulsar Summit SF 2022Welcome and Opening Remarks - Pulsar Summit SF 2022
Welcome and Opening Remarks - Pulsar Summit SF 2022
StreamNative
 
Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...
Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...
Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...
StreamNative
 
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
StreamNative
 

More from StreamNative (20)

Is Using KoP (Kafka-on-Pulsar) a Good Idea? - Pulsar Summit SF 2022
Is Using KoP (Kafka-on-Pulsar) a Good Idea? - Pulsar Summit SF 2022Is Using KoP (Kafka-on-Pulsar) a Good Idea? - Pulsar Summit SF 2022
Is Using KoP (Kafka-on-Pulsar) a Good Idea? - Pulsar Summit SF 2022
 
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
 
Blue-green deploys with Pulsar & Envoy in an event-driven microservice ecosys...
Blue-green deploys with Pulsar & Envoy in an event-driven microservice ecosys...Blue-green deploys with Pulsar & Envoy in an event-driven microservice ecosys...
Blue-green deploys with Pulsar & Envoy in an event-driven microservice ecosys...
 
Distributed Database Design Decisions to Support High Performance Event Strea...
Distributed Database Design Decisions to Support High Performance Event Strea...Distributed Database Design Decisions to Support High Performance Event Strea...
Distributed Database Design Decisions to Support High Performance Event Strea...
 
Simplify Pulsar Functions Development with SQL - Pulsar Summit SF 2022
Simplify Pulsar Functions Development with SQL - Pulsar Summit SF 2022Simplify Pulsar Functions Development with SQL - Pulsar Summit SF 2022
Simplify Pulsar Functions Development with SQL - Pulsar Summit SF 2022
 
Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022
Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022
Towards a ZooKeeper-less Pulsar, etcd, etcd, etcd. - Pulsar Summit SF 2022
 
Validating Apache Pulsar’s Behavior under Failure Conditions - Pulsar Summit ...
Validating Apache Pulsar’s Behavior under Failure Conditions - Pulsar Summit ...Validating Apache Pulsar’s Behavior under Failure Conditions - Pulsar Summit ...
Validating Apache Pulsar’s Behavior under Failure Conditions - Pulsar Summit ...
 
Cross the Streams! Creating Streaming Data Pipelines with Apache Flink + Apac...
Cross the Streams! Creating Streaming Data Pipelines with Apache Flink + Apac...Cross the Streams! Creating Streaming Data Pipelines with Apache Flink + Apac...
Cross the Streams! Creating Streaming Data Pipelines with Apache Flink + Apac...
 
Message Redelivery: An Unexpected Journey - Pulsar Summit SF 2022
Message Redelivery: An Unexpected Journey - Pulsar Summit SF 2022Message Redelivery: An Unexpected Journey - Pulsar Summit SF 2022
Message Redelivery: An Unexpected Journey - Pulsar Summit SF 2022
 
Unlocking the Power of Lakehouse Architectures with Apache Pulsar and Apache ...
Unlocking the Power of Lakehouse Architectures with Apache Pulsar and Apache ...Unlocking the Power of Lakehouse Architectures with Apache Pulsar and Apache ...
Unlocking the Power of Lakehouse Architectures with Apache Pulsar and Apache ...
 
Understanding Broker Load Balancing - Pulsar Summit SF 2022
Understanding Broker Load Balancing - Pulsar Summit SF 2022Understanding Broker Load Balancing - Pulsar Summit SF 2022
Understanding Broker Load Balancing - Pulsar Summit SF 2022
 
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
Building an Asynchronous Application Framework with Python and Pulsar - Pulsa...
 
Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
Pulsar's Journey in Yahoo!: On-prem, Cloud and Hybrid - Pulsar Summit SF 2022
 
Event-Driven Applications Done Right - Pulsar Summit SF 2022
Event-Driven Applications Done Right - Pulsar Summit SF 2022Event-Driven Applications Done Right - Pulsar Summit SF 2022
Event-Driven Applications Done Right - Pulsar Summit SF 2022
 
Pulsar @ Scale. 200M RPM and 1K instances - Pulsar Summit SF 2022
Pulsar @ Scale. 200M RPM and 1K instances - Pulsar Summit SF 2022Pulsar @ Scale. 200M RPM and 1K instances - Pulsar Summit SF 2022
Pulsar @ Scale. 200M RPM and 1K instances - Pulsar Summit SF 2022
 
Data Democracy: Journey to User-Facing Analytics - Pulsar Summit SF 2022
Data Democracy: Journey to User-Facing Analytics - Pulsar Summit SF 2022Data Democracy: Journey to User-Facing Analytics - Pulsar Summit SF 2022
Data Democracy: Journey to User-Facing Analytics - Pulsar Summit SF 2022
 
Beam + Pulsar: Powerful Stream Processing at Scale - Pulsar Summit SF 2022
Beam + Pulsar: Powerful Stream Processing at Scale - Pulsar Summit SF 2022Beam + Pulsar: Powerful Stream Processing at Scale - Pulsar Summit SF 2022
Beam + Pulsar: Powerful Stream Processing at Scale - Pulsar Summit SF 2022
 
Welcome and Opening Remarks - Pulsar Summit SF 2022
Welcome and Opening Remarks - Pulsar Summit SF 2022Welcome and Opening Remarks - Pulsar Summit SF 2022
Welcome and Opening Remarks - Pulsar Summit SF 2022
 
Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...
Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...
Log System As Backbone – How We Built the World’s Most Advanced Vector Databa...
 
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
 

Recently uploaded

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 

Exactly-Once Made Easy: Transactional Messaging in Apache Pulsar - Pulsar Summit NA 2021

  • 1. Pulsar Virtual Summit North America 2021 Exactly-Once Made Easy: Transactional Messaging in Apache Pulsar Sijie Guo Co-Founder and CEO @ StreamNative Addison Higham Chief Architect @ StreamNative
  • 2. Pulsar Virtual Summit North America 2021 Who are we? ● Sijie Guo (@sijieg) ● CEO, StreamNative ● PMC Member of Pulsar/BookKeeper ● Ex-Streamlio, Ex-Twitter ● Addison Higham (@addisonjh) ● Chief Architect, StreamNative ● Pulsar Committer ● Formerly Architect at Instructure
  • 3. Pulsar Virtual Summit North America 2021 StreamNative Founded by the creators of Apache Pulsar, StreamNative provides a cloud-native, unified messaging and streaming platform powered by Apache Pulsar to support multi-cloud and hybrid-cloud strategies
  • 4. Messaging Semantics ✓ At-most once ✓ At-least once ✓ Exactly once
  • 5. Messaging Semantics ✓ At-most once ✓ At-least once ✓ Exactly once Since Pulsar was released
  • 6. Messaging Semantics ✓ At-most once ✓ At-least once ✓ Exactly once Idempotent Producer - 1.20.0-incubating (PIP-6: Guaranteed Message Deduplication)
  • 7. Pulsar Virtual Summit North America 2021 Revisit Existing Semantics
  • 8. Pulsar’s Existing Semantics Producer Broker Topic (Log) send(m1)
  • 9. Pulsar’s Existing Semantics Producer Broker Topic (Log) append(m1)
  • 10. Pulsar’s Existing Semantics Producer Broker Topic (Log) m1
  • 11. Pulsar’s Existing Semantics Producer Broker Topic (Log) m1 ack(m1)
  • 12. Pulsar’s Existing Semantics Producer Broker Topic (Log) m1 ack(m1)
  • 13. Pulsar’s Existing Semantics Producer Broker Topic (Log) send(m2) m1
  • 14. Pulsar’s Existing Semantics Producer Broker Topic (Log) append(m2) m1
  • 15. Pulsar’s Existing Semantics Producer Broker Topic (Log) m1 m2 ack(m2)
  • 16. Pulsar’s Existing Semantics Producer Broker Topic (Log) m1 m2 ack(m2)
  • 17. Pulsar’s Existing Semantics Producer Broker Topic (Log) m1 m2 ack(m2) What do we do now?
  • 18. At-least Once: Resend (m2) Producer Broker Topic (Log) m1 m2 send(m2)
  • 19. At-least Once: Resend (m2) Producer Broker Topic (Log) m1 m2 append(m2)
  • 20. At-least Once: Resend (m2) Producer Broker Topic (Log) m1 m2 m2 Duplicates!!
  • 21. Why the duplicates are introduced? ✓ Broker can fail ✓ The request from Producer to Broker can fail ✓ Producer or Consumer can fail
  • 22. At-most Once: Don’t resend Producer Broker Topic (Log) m1 m2
  • 24. Message Deduplication ✓ Producer: Idempotent Producer ✓ Broker: Guaranteed Message Deduplication (PIP-6) ✓ Consumer: Reader + Checkpoints (Flink / Spark)
  • 25. Idempotent Producer ✓ Producer Name - Identify who is producing the messages ✓ Sequence ID: Identify the message ✓ Producer Name + Sequence ID: The unique identifier for a message
  • 26. Guaranteed Message Deduplication ✓ Broker maintains a map between Producer Name and last produced sequence ID ✓ Broker accepts a message if its sequence ID is larger than the last produced sequence ID ✓ Broker discards a message whose sequence ID is smaller than the last produced Sequence ID ✓ Broker keeps a map between Producer Name and last Sequence ID in a deduplication cursor (stored in Apache BookKeeper)
  • 27. Exactly Once Producer Broker Topic (Log) send(1, m1)
  • 28. Exactly Once Producer Producer Broker Topic (Log) append(1, m1) 1, m1
  • 29. Exactly Once Producer Producer Broker Topic (Log) append(2, m2) 1, m1 2, m2
  • 30. Exactly Once Producer Producer Broker Topic (Log) 1, m1 2, m2 ack(2, m2) What do we do now?
  • 31. Exactly Once Producer Producer Broker Topic (Log) 1, m1 2, m2 send(2, m2)
  • 32. Exactly Once Producer Producer Broker Topic (Log) 1, m1 2, m2 append(2, m2)
  • 33. Exactly Once Producer Producer Broker Topic (Log) 1, m1 2, m2 append(2, m2) Duplicate detected
  • 34. Exactly Once Producer Producer Broker Topic (Log) 1, m1 2, m2 ack(2, m2)
  • 35. Enable Exactly Once ✓ Enable deduplication: `bin/pulsar-admin namespaces set- deduplication -e tenant/namespace` ✓ Set producer name when creating a producer ✓ Specify increasing sequence id when producing messages (optional)
  • 36. Exactly Once Consumer Consumer Broker Topic (Log) 1, m1 2, m2 receive_after(m1) Last Received: m1
  • 37. Exactly Once Consumer Consumer Broker Topic (Log) 1, m1 2, m2 dispatch(m2) Last Received: m2
  • 38. Limitations ✓ It only works when producing messages to one partition ✓ It only works for producing one message ✓ There is no atomicity when producing multiple messages to one partition or many partitions ✓ Consumers are required to store the Message ID along with its state and seek back to the Message ID when restoring the state
  • 39. Pulsar Virtual Summit North America 2021 Introducing Transactions
  • 42. PulsarCash, powered by Apache Pulsar ✓ Transfer Topic: record all the transfer requests ✓ Cash Transfer Function: perform the cash transfer action ✓ BalanceUpdate Topic: record the balance-update requests
  • 43. PulsarCash Transfer Topic User:bob, credit($10) BalanceUpdate Topic BalanceUpdate Topic User:alice, debit($10) Cash Transfer Function (100,0,0): transfer ($10, alice -> bob)
  • 44. Ack Transfer Transfer Topic User:bob, credit($10) BalanceUpdate Topic BalanceUpdate Topic User:alice, debit($10) Cash Transfer Function (100,0,0): transfer ($10, alice -> bob) Ack: (100, 0, 0)
  • 45. Reprocessed Transfer! Transfer Topic User:bob, credit($10) BalanceUpdate Topic BalanceUpdate Topic User:alice, debit($10) Cash Transfer Function (100,0,0): transfer ($10, alice -> bob) Ack: (100, 0, 0)
  • 46. Lost Money! Transfer Topic User:bob, credit($10) BalanceUpdate Topic BalanceUpdate Topic User:alice, debit($10) Cash Transfer Function (100,0,0): transfer ($10, alice -> bob) Ack: (100, 0, 0)
  • 47. Pulsar Virtual Summit North America 2021 Pulsar Transaction Explained
  • 48. Transaction Semantics ✓ Atomic writes across multiple topic partitions ✓ Atomic acknowledgments across multiple topic partitions ✓ All the operations made within one transaction either all succeed or all fail ✓ Conditional acknowledgement to handle network partition ✓ Consumers are *ONLY* allowed to read committed messages
  • 49. Without Transaction API Message<Transfer> tf = inputConsumer.receive(); MessageId msg1 = producer1.newMessage().value( BalanceTransfer(tf.sender, tf.amount, “debit”)).send(); MessageId msg2 = producer2.newMessage().value( BalanceTransfer(tf.receiver, tf.amount, “credit”)).send(); inputConsumer.acknowledge(tf.getMessageId());
  • 50. Pulsar Client Cursor Input Topic Output Topic 1 Output Topic 2 Broker 0 Broker 1 Input Consumer Producer 1 Producer 2 1) Receive Message 2) Produce Messages 3) Ack Message
  • 51. Transaction API Message<Transfer> message = inputConsumer.receive(); Transaction txn = client.newTransaction().withTransactionTimeout(...).build().get(); MessageId msg1 = producer1.newMessage(txn).value( BalanceTransfer(tf.sender, tf.amount, “debit”)).send; MessageId msg2 = producer2.newMessage(txn).value( BalanceTransfer(tf.receiver, tf.amount, “credit”)).send(); inputConsumer.acknowledge(message.getMessageId(), txn); txn.commit().get();
  • 52. Pulsar Client Cursor Input Topic Output Topic 1 Output Topic 2 Broker 0 Broker 1 Input Consumer Producer 1 Producer 2 Coordinator Transaction Log Txn Buffer Txn Buffer
  • 53. Pulsar Client Cursor Input Topic Output Topic 1 Output Topic 2 Broker 0 Broker 1 Input Consumer Producer 1 Producer 2 Coordinator Transaction Log Txn Buffer Txn Buffer
  • 54. Transaction Coordinator (TC) ✓ TC: Transaction manager, coordinating committing and aborting transactions ✓ In-Memory + Transaction Log ✓ Transaction Log is powered by a partitioned Pulsar topic ✓ Locating a TC is locating a partition of the transaction log topic
  • 55. Pulsar Client Cursor Input Topic Output Topic 1 Output Topic 2 Broker 0 Broker 1 Input Consumer Producer 1 Producer 2 Coordinator Transaction Log Txn Buffer Txn Buffer
  • 56. Transaction Buffer (TB) ✓ TB: store and index transaction data (per topic partition) ✓ TB is implemented using another managed-ledger (ML) ✓ Transactional messages are appended to TB ✓ Transaction index is maintained in memory and snapshotted to ledgers ✓ Transaction index can be rebuilt from TB
  • 57. Pulsar Client Cursor Input Topic Output Topic 1 Output Topic 2 Broker 0 Broker 1 Input Consumer Producer 1 Producer 2 Coordinator Transaction Log Txn Buffer Txn Buffer
  • 58. Transactional Subscription State (TSS) ✓ Introduce ACK_PENDING state ✓ Add response for acknowledgment, aka Ack-on-Ack ✓ Acknowledgment state is updated to cursor ledger ✓ Acknowledgment state can be replayed from cursor ledger
  • 59. Pulsar Virtual Summit North America 2021 Transaction Execution Flow
  • 60. Transaction API Message<Transfer> message = inputConsumer.receive(); Transaction txn = client.newTransaction().withTransactionTimeout(...).build().get(); MessageId msg1 = producer1.newMessage(txn).value( BalanceTransfer(tf.sender, tf.amount, “debit”)).send; MessageId msg2 = producer2.newMessage(txn).value( BalanceTransfer(tf.receiver, tf.amount, “credit”)).send(); inputConsumer.acknowledge(message.getMessageId(), txn); txn.commit().get();
  • 61. Pulsar Client Cursor Input Topic Output Topic 1 Output Topic 2 Broker 0 Broker 1 Input Consumer Producer 2 Coordinator Transaction Log Txn Buffer Txn Buffer Txn New Txn Producer 1 Tx1 1. New Txn
  • 62. Transaction API Message<Transfer> message = inputConsumer.receive(); Transaction txn = client.newTransaction().withTransactionTimeout(...).build().get(); MessageId msg1 = producer1.newMessage(txn).value( BalanceTransfer(tf.sender, tf.amount, “debit”)).send; MessageId msg2 = producer2.newMessage(txn).value( BalanceTransfer(tf.receiver, tf.amount, “credit”)).send(); inputConsumer.acknowledge(message.getMessageId(), txn); txn.commit().get();
  • 63. Pulsar Client Cursor Input Topic Output Topic 1 Output Topic 2 Broker 0 Broker 1 Input Consumer Producer 2 Coordinator Transaction Log Txn Buffer Txn Buffer Txn New Txn Producer 1 Tx1 Tx1: add [T1, T2] Tx1: M1 Tx1: M2 2.2 Produced Messages To Topics with Txn 2.1 Add Produced Topics To Txn
  • 64. Transaction API Message<Transfer> message = inputConsumer.receive(); Transaction txn = client.newTransaction().withTransactionTimeout(...).build().get(); MessageId msg1 = producer1.newMessage(txn).value( BalanceTransfer(tf.sender, tf.amount, “debit”)).send; MessageId msg2 = producer2.newMessage(txn).value( BalanceTransfer(tf.receiver, tf.amount, “credit”)).send(); inputConsumer.acknowledge(message.getMessageId(), txn); txn.commit().get();
  • 65. Pulsar Client Cursor Input Topic Output Topic 1 Output Topic 2 Broker 0 Broker 1 Input Consumer Producer 2 Coordinator Transaction Log Txn Buffer Txn Buffer Txn New Txn Producer 1 Tx1 Tx1: add [T1, T2] Tx1: M1 Tx1: M2 3.1 Add Acked Subscriptions to Txn Tx1: ACK (M0) 3.2 Ack messages with Txn Tx1: add [S0]
  • 66. Transaction API Message<Transfer> message = inputConsumer.receive(); Transaction txn = client.newTransaction().withTransactionTimeout(...).build().get(); MessageId msg1 = producer1.newMessage(txn).value( BalanceTransfer(tf.sender, tf.amount, “debit”)).send; MessageId msg2 = producer2.newMessage(txn).value( BalanceTransfer(tf.receiver, tf.amount, “credit”)).send(); inputConsumer.acknowledge(message.getMessageId(), txn); txn.commit().get();
  • 67. Pulsar Client Cursor Input Topic Output Topic 1 Output Topic 2 Broker 0 Broker 1 Input Consumer Producer 2 Coordinator Transaction Log Txn Buffer Txn Buffer Txn New Txn Producer 1 Tx1 Tx1: add [T1, T2] Tx1: M1 Tx1: M2 4.0 Commit Txn Tx1: ACK (M0) Tx1: add [S0] 4.0.1 Committing Txn Tx1: Committing
  • 68. Pulsar Client Cursor Input Topic Output Topic 1 Output Topic 2 Broker 0 Broker 1 Input Consumer Producer 2 Coordinator Transaction Log Txn Buffer Txn Buffer Txn New Txn Producer 1 Tx1 Tx1: add [T1, T2] Tx1: M1 Tx1: M2 Tx1: ACK (M0) Tx1: add [S0] Tx1: Committing Tx1: Committed Tx1: (c) Tx1: (c) 4.1.1 Commit Txn on Subscriptions 4.1.0 Commit Txn on Topics
  • 69. Pulsar Client Cursor Input Topic Output Topic 1 Output Topic 2 Broker 0 Broker 1 Input Consumer Producer 2 Coordinator Transaction Log Txn Buffer Txn Buffer Txn New Txn Producer 1 Tx1 Tx1: add [T1, T2] Tx1: M1 Tx1: M2 Tx1: ACK (M0) Tx1: add [S0] Tx1: Committing Tx1: Committed Tx1: Committed Tx1: (c) Tx1: (c) 4.2 Commit Txn
  • 70. Pulsar Virtual Summit North America 2021 Failure Handling in Transaction
  • 71. Pulsar Client Cursor Input Topic Output Topic 1 Output Topic 2 Broker 0 Broker 1 Input Consumer Producer 2 Coordinator Transaction Log Txn Buffer Txn Buffer Txn New Txn Producer 1 Tx1 1. New Txn
  • 72. Pulsar Client Cursor Input Topic Output Topic 1 Output Topic 2 Broker 0 Broker 1 Input Consumer Producer 2 Coordinator Transaction Log Txn Buffer Txn Buffer Txn New Txn Producer 1 Tx1 Tx1: add [T1, T2] Tx1: M1 Tx1: M2 2.2 Produced Messages To Topics with Txn 2.1 Add Produced Topics To Txn
  • 73. Pulsar Client Cursor Input Topic Output Topic 1 Output Topic 2 Broker 0 Broker 1 Input Consumer Producer 2 Coordinator Transaction Log Txn Buffer Txn Buffer Txn New Txn Producer 1 Tx1 Tx1: add [T1, T2] Tx1: M1 Tx1: M2 3.1 Add Acked Subscriptions to Txn Tx1: ACK (M0) 3.2 Ack messages with Txn Tx1: add [S0]
  • 74. Pulsar Client Cursor Input Topic Output Topic 1 Output Topic 2 Broker 0 Broker 1 Input Consumer Producer 2 Coordinator Transaction Log Txn Buffer Txn Buffer Txn New Txn Producer 1 Tx1 Tx1: add [T1, T2] Tx1: M1 Tx1: M2 Tx1: ACK (M0) Tx1: add [S0] Tx1: Committing Tx1: Committed Tx1: (c) Tx1: (c) 4.1.1 Commit Txn on Subscriptions 4.1.0 Commit Txn on Topics
  • 75. Transaction API - Async Example inputConsumer.receiveAsync.thenCompose(tf -> { return client.newTransaction().withTransactionTimeout(...).build().thenCompose(txn ->{ producer1.newMessage(txn).value(BalanceTransfer(...)).sendAsync(); producer2.newMessage(txn).value(BalacneTransfer(...)).sendAsync(); inputConsumer.acknowledgeAsync(tf.getMessageId(), txn); return txn.commit(); }); });
  • 76. PulsarCash Transfer Topic User:bob, credit($10) BalanceUpdate Topic BalanceUpdate Topic User:alice, debit($10) Cash Transfer Function (100,0,0): transfer ($10, alice -> bob) Ack: (100, 0, 0)
  • 77. PulsarCash Transfer Topic User:bob, credit($10) BalanceUpdate Topic BalanceUpdate Topic User:alice, debit($10) Cash Transfer Function (100,0,0): transfer ($10, alice -> bob) Ack: (100, 0, 0) Transaction
  • 78. Pulsar Virtual Summit North America 2021 Pulsar Transaction Makes Messaging and Streaming easy and reliable for everyone
  • 79. What’s Next ✓ Transaction Support in other languages (e.g. C++, Go) ✓ Transaction in Pulsar Functions & Pulsar IO ✓ Transaction in Kafka-on-Pulsar, AMQP-on-Pulsar, MQTT-on-Pulsar ✓ Transaction with State Storage in Pulsar Functions ✓ ...
  • 80. Credits ✓ Developers: Penghui, Bo Cong, Ran Gao, Yong Zhang, Marvin Cai ✓ Reviewers: Jia Zhai, Matteo Merli, Addison Higham, Sijie Guo ✓ … and many other Pulsar users & contributors
  • 81. Try Pulsar Transaction today! ✓ GA Release: 2.8.0 ✓ Try it today! ✓ StreamNative Cloud - Fully managed SaaS service ✓ StreamNative Platform - Self-managed enterprise software
  • 82. StreamNative Platform Self-managed enterprise offering of Pulsar ✓ Kafka-on-Pulsar ✓ Function Mesh for serverless streaming ✓ Enterprise-ready security ✓ Pulsar Operators ✓ Seamless StreamNative Cloud experience https://streamnative.io/platform
  • 83. StreamNative Cloud Fully-managed Pulsar-as-a-Service ✓ Massive scale without the ops overhead ✓ Built for hybrid and multi-cloud ✓ Cloud-Hosted & Cloud-Managed ✓ Stream across public clouds for multi- cloud applications ✓ Elastic, consumption-based pricing with ‘pay as you go’ model ✓ Reliably scale mission-critical apps https://streamnative.io/cloud
  • 84. We’re hiring Build Pulsar with the team that builds Pulsar ✓ Work with the creators of Pulsar ✓ Exciting, growth-stage company ✓ Open and collaborative environment ✓ Competitive compensation and benefits ✓ Best teammates on earth https://streamnative.io/careers