kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [kafka] branch 2.1 updated: KAFKA-7705; Fix and simplify producer config in javadoc example (#6000)
Date Wed, 12 Dec 2018 16:38:21 GMT
This is an automated email from the ASF dual-hosted git repository.

jgus pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.1 by this push:
     new 0be524b  KAFKA-7705; Fix and simplify producer config in javadoc example (#6000)
0be524b is described below

commit 0be524b324101914649ecaaa20702e7dfa1e8ec5
Author: hackerwin7 <hackerswin7@gmail.com>
AuthorDate: Thu Dec 13 00:37:09 2018 +0800

    KAFKA-7705; Fix and simplify producer config in javadoc example (#6000)
    
    The example in the producer's javadoc contained an inconsistent value for `delivery.timeout.ms`.
This patch removes the inconsistent config and several unnecessary overrides in order to simplify
the example.
    
    Reviewers: huxi <huxi_2b@hotmail.com>, Ismael Juma <ismael@juma.me.uk>, Jason
Gustafson <jason@confluent.io>
---
 .../main/java/org/apache/kafka/clients/producer/KafkaProducer.java    | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java b/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
index c68a014..9486c3d 100644
--- a/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
+++ b/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
@@ -95,10 +95,6 @@ import org.slf4j.Logger;
  * Properties props = new Properties();
  * props.put("bootstrap.servers", "localhost:9092");
  * props.put("acks", "all");
- * props.put("delivery.timeout.ms", 30000);
- * props.put("batch.size", 16384);
- * props.put("linger.ms", 1);
- * props.put("buffer.memory", 33554432);
  * props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
  * props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
  *


Mime
View raw message