Have you set consumer isolation level? If it was set to uncommitted, it
will be able to see messages you produced, without commitTransaction call
On Tue, Jan 26, 2021 at 7:43 AM 积淀智慧 <dream_zph@163.com> wrote:
> Hello, everybody,
>
>
> I'm running some tests while using Kafka transactions.
>
>
> test 1 :
> String msg = "matt test";
> String topic = "test";
> producer.beginTransaction();
> producer.send(new ProducerRecord(topic, "0", msg.toString()));
> producer.send(new ProducerRecord(topic, "1", msg.toString()));
> producer.send(new ProducerRecord(topic, "2", msg.toString()));
> for (; ; ) { }
>
>
> test result:Messages also arrive at the consumer without delay.
>
>
> My question is, why can data be committed without commitTransaction.
>
>
> thx
>
>
>
>
>
>
>
>
>
>
>
>
>
>
will be able to see messages you produced, without commitTransaction call
On Tue, Jan 26, 2021 at 7:43 AM 积淀智慧 <dream_zph@163.com> wrote:
> Hello, everybody,
>
>
> I'm running some tests while using Kafka transactions.
>
>
> test 1 :
> String msg = "matt test";
> String topic = "test";
> producer.beginTransaction();
> producer.send(new ProducerRecord(topic, "0", msg.toString()));
> producer.send(new ProducerRecord(topic, "1", msg.toString()));
> producer.send(new ProducerRecord(topic, "2", msg.toString()));
> for (; ; ) { }
>
>
> test result:Messages also arrive at the consumer without delay.
>
>
> My question is, why can data be committed without commitTransaction.
>
>
> thx
>
>
>
>
>
>
>
>
>
>
>
>
>
>
Comments
Post a Comment