merlimat commented on a change in pull request #1553: Pulsar 2.0 docs
URL: https://github.com/apache/incubator-pulsar/pull/1553#discussion_r184607301
##########
File path: site/docs/latest/clients/Java.md
##########
@@ -100,24 +98,41 @@ In Pulsar, {% popover producers %} write {% popover
messages %} to {% popover to
```java
String topic = "persistent://sample/standalone/ns1/my-topic";
-Producer producer = client.newProducer()
+Producer producer<byte[]> = client.newProducer()
.topic(topic)
.create();
```
You can then send messages to the broker and topic you specified:
```java
+import org.apache.pulsar.client.api.MessageBuilder;
+
+import java.util.stream.IntStream;
+
+MessageBuilder<byte[]> msgBuilder = MessageBuilder.create();
Review comment:
`MessageBuilder` instance cannot be reused
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services