You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Dongjin Lee (Jira)" <ji...@apache.org> on 2020/02/21 04:54:00 UTC
[jira] [Updated] (KAFKA-9587) Producer configs are omitted in the
documentation
[ https://issues.apache.org/jira/browse/KAFKA-9587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dongjin Lee updated KAFKA-9587:
-------------------------------
Description:
As of 2.4, [the KafkaProducer documentation|https://kafka.apache.org/24/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html] states:
{quote}If the request fails, the producer can automatically retry, though since we have specified retries as 0 it won't.
{quote}
{quote}... in the code snippet above, likely all 100 records would be sent in a single request since we set our linger time to 1 millisecond.
{quote}
However, the code snippet (below) does not include any configurtaion on '{{retry'}} or '{{linger.ms'}}:
{quote}Properties props = new Properties();
props.put("bootstrap.servers", "localhost:9092");
props.put("acks", "all");
props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
{quote}
The same documentation in [version 2.0|https://kafka.apache.org/20/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html] includes the configs; However, [2.1|https://kafka.apache.org/21/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html] only includes '{{linger.ms}}' and [2.2|https://kafka.apache.org/22/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html] includes none. It seems like it was removed in the middle of two releases.
was:
As of 2.4, [the Producer documentation|https://kafka.apache.org/24/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html] states:
{quote}If the request fails, the producer can automatically retry, though since we have specified retries as 0 it won't.{quote}
{quote}... in the code snippet above, likely all 100 records would be sent in a single request since we set our linger time to 1 millisecond.{quote}
However, the code snippet (below) does not include any configurtaion on '{{retry'}} or '{{linger.ms'}}:
{quote}Properties props = new Properties();
props.put("bootstrap.servers", "localhost:9092");
props.put("acks", "all");
props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
{quote}
The same documentation in [version 2.0|https://kafka.apache.org/20/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html] includes the configs; However, [2.1|https://kafka.apache.org/21/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html] only includes '{{linger.ms}}' and [2.2|https://kafka.apache.org/22/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html] includes none. It seems like it was removed in the middle of two releases.
> Producer configs are omitted in the documentation
> -------------------------------------------------
>
> Key: KAFKA-9587
> URL: https://issues.apache.org/jira/browse/KAFKA-9587
> Project: Kafka
> Issue Type: Improvement
> Components: clients, documentation
> Affects Versions: 2.4.0
> Reporter: Dongjin Lee
> Assignee: Dongjin Lee
> Priority: Minor
> Fix For: 2.5.0
>
>
> As of 2.4, [the KafkaProducer documentation|https://kafka.apache.org/24/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html] states:
> {quote}If the request fails, the producer can automatically retry, though since we have specified retries as 0 it won't.
> {quote}
> {quote}... in the code snippet above, likely all 100 records would be sent in a single request since we set our linger time to 1 millisecond.
> {quote}
> However, the code snippet (below) does not include any configurtaion on '{{retry'}} or '{{linger.ms'}}:
> {quote}Properties props = new Properties();
> props.put("bootstrap.servers", "localhost:9092");
> props.put("acks", "all");
> props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
> props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
> {quote}
> The same documentation in [version 2.0|https://kafka.apache.org/20/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html] includes the configs; However, [2.1|https://kafka.apache.org/21/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html] only includes '{{linger.ms}}' and [2.2|https://kafka.apache.org/22/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html] includes none. It seems like it was removed in the middle of two releases.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)