merlimat closed pull request #1942: Use builder methods in getting started docs
URL: https://github.com/apache/incubator-pulsar/pull/1942
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/site/docs/latest/getting-started/LocalCluster.md
b/site/docs/latest/getting-started/LocalCluster.md
index 1259beb4b7..af2a89e319 100644
--- a/site/docs/latest/getting-started/LocalCluster.md
+++ b/site/docs/latest/getting-started/LocalCluster.md
@@ -84,8 +84,8 @@ Here's an example producer for a Pulsar {% popover topic %}
using the [Java](../
```java
String localClusterUrl = "pulsar://localhost:6650";
-PulsarClient client = PulsarClient.create(localClusterUrl);
-Producer producer = client.createProducer("my-topic");
+PulsarClient client =
PulsarClient.builder().serviceURL(localClusterUrl).build();
+Producer<byte[]> producer = client.newProducer().topic("my-topic").create();
```
Here's an example [Python](../../clients/Python) producer:
----------------------------------------------------------------
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