Apache Kafka supports transactional record delivery (and consumption if in consumer-process-produce processing mode).
Every Kafka broker runs a TransactionCoordinator to manage (coordinate) transactions.
Any record sending has to be after KafkaProducer.initTransactions followed by KafkaProducer.beginTransaction. Otherwise, the underlying TransactionManager is going to be in a wrong state (that will inevitably lead to exceptions).
--isolation-level option for isolation.level configuration property.
Transactional Configuration Properties¶
Kafka brokers use
__transaction_state internal topic for managing transactions (as records).
__transaction_state is auto-created at the first transaction.
The number of partitions is configured using transaction.state.log.num.partitions configuration property.
- Transactions in Apache Kafka by Confluent