showuon commented on a change in pull request #11564: URL: https://github.com/apache/kafka/pull/11564#discussion_r761685896
########## File path: core/src/main/scala/kafka/tools/ConsoleProducer.scala ########## @@ -146,62 +146,71 @@ object ConsoleProducer { .describedAs("size") .ofType(classOf[java.lang.Integer]) .defaultsTo(200) - val messageSendMaxRetriesOpt = parser.accepts("message-send-max-retries", "Brokers can fail receiving the message for multiple reasons, and being unavailable transiently is just one of them. This property specifies the number of retries before the producer give up and drop this message.") + val messageSendMaxRetriesOpt = parser.accepts("message-send-max-retries", "Brokers can fail receiving the message for multiple reasons, " + + "and being unavailable transiently is just one of them. This property specifies the number of retries before the producer give up and drop this message. " + + "This is the option to control the `retries` in producer configs.") .withRequiredArg .ofType(classOf[java.lang.Integer]) - .defaultsTo(3) - val retryBackoffMsOpt = parser.accepts("retry-backoff-ms", "Before each retry, the producer refreshes the metadata of relevant topics. Since leader election takes a bit of time, this property specifies the amount of time that the producer waits before refreshing the metadata.") + .defaultsTo(Integer.MAX_VALUE) Review comment: `retries` config is now default to `Integer.MAX_VALUE`, and not recommended to set value not 0 or Integer.MAX_VALUE. We have default timeout to control the retry mechanism. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org