Versions Compared

Key

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

...

Multiple-thread is not implemented in ConsumerPerformance. It was implemented for old consumer and removed completely in https://github.com/apache/kafka/pull/5230/, but the option [threads] was kept. It's necessary to make option [threads] work again.

Public Interfaces

...

A public interface is any change to the following:

...

Binary log format

...

The network protocol and api behavior

Any class in the public packages under clientsConfiguration, especially client configuration

...

org/apache/kafka/common/serialization

...

org/apache/kafka/common

...

org/apache/kafka/common/errors

...

org/apache/kafka/clients/producer

...

kafka

...

Monitoring

...

Command line tools and arguments

...

kafka.tools.ConsumerPerformance is used in kafka-consumer-perf-test.sh.  This KIP is to make option [threads] work. 

Proposed Changes

Describe the new thing you want to do in appropriate detail. This may be fairly extensive and have large subsections of its own. Or it may be a few sentences. Use judgement based on the scope of the change.

We define a new class ConsumerPerfThread in ConsumerPerformance to implement multi-thread, which is not a public interface.

...

Compatibility, Deprecation, and Migration Plan

...

N/A

Rejected Alternatives

Just as the multi-thread implement for the old Consumer,  the option [numMessages] is the number of messages every thread to consume not the total message to consume for all threads. This way can avoid using global variable totalMesssageRead as a condition to end thread.  

...