Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kafka transactions on multiple clusters

Tags:

apache-kafka

I could not find the answer in the transaction API. I think it's probably not possible looking at the design under the hood but I wanted a confirmation: is it possible to have a Kafka transaction if the consumer and the producer are connected to different Kafka clusters? Meaning the topics I am consuming from and the topics I am pushing to are on 2 separate Kafka clusters.

like image 799
CanardMoussant Avatar asked Oct 29 '25 17:10

CanardMoussant


1 Answers

You are correct, a Kafka transaction cannot span across multiple clusters.

Both the consumer and producer must use the same cluster. The main reason is that both the offsets from the consumer and the records from the producer have to be committed together in the transaction.

like image 153
Mickael Maison Avatar answered Oct 31 '25 12:10

Mickael Maison



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!