Reputation: 129
Now that idempotent producer can provide the exactly once guarantee for every TopicPartition, why do we need transactions to provide guarantees for writes across multiple TopicPartitions?
Upvotes: 0
Views: 133
Reputation: 26885
The idempotent producer only guarantees exactly once semantics for each individual Produce request it sends. Each idempotent request can succeed or fail and they are all independent.
On the other side, transactions allows to group several requests (potentially to many partitions and on many brokers) to be all treated as a group. So when committing the transaction, either all of them will be successful or all of them will be discarded.
Upvotes: 1