Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Transactions in Kafka is similar to Transactions in regular databases.

producer.beginTransaction();
producer.send(new ProducerRecord<>("A", "...", "..."));
producer.send(new ProducerRecord<>("B", "...", "..."));
producer.sendOffsetsToTransaction(offsets, group); // commit offsets in the topic a consumer is reading from

  • No labels