Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We add a new config TOPIC_ACKS_CONFIG  and TOPIC_ACKS_DOC into ProducerConfig and define the format.

  • Format  : acks.topic => acks.<TopicA>=<acks1>:acks.<TopicB>=<acks2>
  • example: config.put(acks.topic, acks.money=-1:acks.temperature=1)

Name

Type

Importance

Default

Description

acks.topicStringLOW
null

This configuration item will set acks for specific topics.

...

  • Adding a new configuration in  ProducerConfig : acks.topic,  By setting this configuration item, users can customize the acks for specific topic.
  • Behavior change:
    1. Attach topic-level acks to RecordAccumulator#TopicInfo.
    2. Return Map<Acks, List<ProducerBatch>> when RecordAccumulator#drainBatchesForOneNode is called.
    3. Finally, we can get the acks information and group same acks into List<ProducerBatch>> for a node in sender#sendProduceRequests and then send request.

...