Does Kafka Support Two Phase Commit?

Does Kafka Support Two Phase Commit?

After the producer initiates a commit (or an abort), the coordinator begins the two-phase commit protocol. In the first phase, the coordinator updates its internal state to “prepare_commit” and updates this state in the transaction log

transaction log
In the field of databases in computer science, a transaction log (also transaction journal, database log, binary log or audit trail) is a history of actions executed by a database management system used to guarantee ACID properties over crashes or hardware failures.
› wiki › Transaction_log
. Once this is done the transaction is guaranteed to be committed no matter what.

Where is 2 phase commit used?

The two-phase commit protocol (2PC) has been used in enterprise software systems for over three decades. It has been an an incredibly impactful protocol for ensuring atomicity and durability of transactions that access data in multiple partitions or shards.

Does Kafka support XA transactions?

Kafka has no support for XA transactions. Kafka delegates the burden of exactly-once to the message consumer.

James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.