From 693ea906c33b8ca83a8532644fec8c19e482e5a0 Mon Sep 17 00:00:00 2001 From: Ivan Kelly Date: Tue, 19 Jun 2018 20:10:52 +0200 Subject: [PATCH] Use builder methods in getting started docs (#1942) * Fix topic name in getting started documentation It was "my-topic", when it should have been persistent://public/default/my-topic. * Remove topic changes --- site/docs/latest/getting-started/LocalCluster.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/docs/latest/getting-started/LocalCluster.md b/site/docs/latest/getting-started/LocalCluster.md index 1259beb4b7d07..af2a89e319147 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 producer = client.newProducer().topic("my-topic").create(); ``` Here's an example [Python](../../clients/Python) producer: