Kafka 0.8 manufacturer, using the property "request.required.acks"

From 0.8 Documentation in manufacturer settings property request.required.acks

The value controls when producer receives an acknowledgement from the broker.

Typical values

(1) 0, which means that the manufacturer never waits for confirmation from the broker

(2) 1, which means that producer gets an acknowledgement after the leader’s replica received the data

(3) -1, which means that producer gets an acknowledgement after all built-in replicas received data

How to get this confirmation in the producer when the request.required.acks value is 1 . producer.send(MessageKey) , being a void, I could not find any options for receiving it.

+4
source share
1 answer

The manufacturer sender API leaves much to be desired, especially in asynchronous mode. These files are hidden from the user of the manufacturer. If they fail, you will eventually see an exception.

The problem in the asynchronous case is that you do not know if the initial batch was unsuccessful, so some assumptions will be involved if you want to retry sending later.

It appears that future releases (> 0.8.0) plan to improve this.

0
source

Source: https://habr.com/ru/post/1499235/


All Articles