Tao Chen created KAFKA-9151:
-------------------------------
Summary: KafkaProducer.send should warmup metadata information
when application starts
Key: KAFKA-9151
URL: https://issues.apache.org/jira/browse/KAFKA-9151
Project: Kafka
Issue Type: Improvement
Components: producer
Reporter: Tao Chen
When application restarts, the performance of KafkaProducer.send is slow due to
metadata not available.
We know that it is an old topic that whether should wait for metadata update or
not.
"Some user may still want to wait for a configurable amount of time on
producer.send() if the queue is full instead of dropping messages immedidately.
Users who want complete non-blocking producer.send() can set max.block.ms to 0."
If max.block.ms is to 0, these messages can not be send successfully due to
metadata not available. We have to restore these messages and try again when
metadata is available, which brings much extra effect.
Is it possible to provide a startup hook for users to warmup the metadata when
application starts. Only after the metadata is available, application starts to
work accordingly.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)