Skip to content

MINOR KAFKA-7705 : update java doc for delivery.timeout.ms#6000

Merged
hachikuji merged 2 commits intoapache:trunkfrom
hackerwin7:update-produce-java-doc
Dec 12, 2018
Merged

MINOR KAFKA-7705 : update java doc for delivery.timeout.ms#6000
hachikuji merged 2 commits intoapache:trunkfrom
hackerwin7:update-produce-java-doc

Conversation

@hackerwin7
Copy link
Copy Markdown
Contributor

update KafkaProducer javadoc to put delivery.timeout.ms >= request.timeout.ms + linger.ms

@huxihx
Copy link
Copy Markdown
Contributor

huxihx commented Dec 6, 2018

LGTM. @hachikuji Please help review this minor doc change.

* props.put("bootstrap.servers", "localhost:9092");
* props.put("acks", "all");
* props.put("delivery.timeout.ms", 30000);
* props.put("delivery.timeout.ms", 30001);
Copy link
Copy Markdown
Member

@ijuma ijuma Dec 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should actually make this example simpler. Most of these configs don't need to be changed. We could change the example to be something like:

 * Properties props = new Properties();
 * props.put("bootstrap.servers", "localhost:9092");
 * props.put("acks", "all");
 *
 * try (Producer<String, String> producer = new KafkaProducer<>(props, new StringSerializer(), new StringSerializer())) {
 *     for (int i = 0; i < 100; i++)
 *         producer.send(new ProducerRecord<>("my-topic", Integer.toString(i), Integer.toString(i)));
 * }

What do you think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'll update it.

@hackerwin7
Copy link
Copy Markdown
Contributor Author

@ijuma could you review this again? thanks.

Copy link
Copy Markdown
Contributor

@hachikuji hachikuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the PR!

@hachikuji hachikuji merged commit 975b680 into apache:trunk Dec 12, 2018
hachikuji pushed a commit that referenced this pull request Dec 12, 2018
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>
pengxiaolong pushed a commit to pengxiaolong/kafka that referenced this pull request Jun 14, 2019
…he#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants