elhadi
elhadi

Reputation: 1

kafka stream with exactly_once enabled generate several duplicated messages

Kafka stream with exactly_once enabled generate several duplicated messages with (not committed transaction status)

I did a tests in my pc :

Is there a reason to have more 554 messages when activating "exactly_once" option ?

Thank you.

Upvotes: 0

Views: 221

Answers (1)

Bruno Cadonna
Bruno Cadonna

Reputation: 1418

The 554 messages are most likely the transaction markers that are needed to provide exactly-once delivery semantics.

When you use exactly-once, Kafka Streams uses Kafka transactions to write records to the output topics. Kafka transactions use transaction markers to mark whether records were part of a committed or an aborted transaction.

A consumer with isolation level read_commited interprets the transaction markers to decide which records to skip because they were part of an aborted transactions and which records to return in calls to poll() because they were part of a committed transaction.

Upvotes: 0

Related Questions