kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias J. Sax" <matth...@confluent.io>
Subject Re: Kafka exactly-once with multiple producers
Date Wed, 06 Feb 2019 07:26:27 GMT
Each producer will need to use it's own `transactional.id`. Otherwise,
one producer would fence-off and "block" the other.

Both producers can start transactions independently from each other, and
also commit independently (or abort, or a mix of commit/abort between
both). Messages of both producers will be written interleaved into the
topic (similar to how producers write without EOS).

> does Kafka guarantee only 1 producer request
>> will be processed at a time?

No. There is no reason for this. It's possible that both producer have
an open transaction and write their data interleaved into the topic.


-Matthias

On 2/5/19 5:55 PM, Tim Jiang wrote:
> Hi,
> I'm read this about how Kafka transaction works:
> https://www.confluent.io/blog/transactions-apache-kafka/
> Please help me understand what happens when there are multiple producers
> are writing to the same topic concurrently? Should all of them use the same
> transaction id, and if so, does Kafka guarantee only 1 producer request
> will be processed at a time?
> 
> Thanks,
> Tim
> 


Mime
View raw message