Skip to content

Commit

Permalink
Issue apache#3373: RemotelyClosedException when running SampleProducer
Browse files Browse the repository at this point in the history
*Motivation*

Fixes apache#3373 

The service url in SampleProducer is wrong.

*Modification*

Fix the service url in SampleProducer and SampleConsumer.
  • Loading branch information
ambition119 authored and sijie committed Jan 17, 2019
1 parent 9e5d9de commit 757c3f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
public class SampleConsumer {
public static void main(String[] args) throws PulsarClientException, InterruptedException {

PulsarClient pulsarClient = PulsarClient.builder().serviceUrl("http://localhost:8080").build();
PulsarClient pulsarClient = PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build();

Consumer<byte[]> consumer = pulsarClient.newConsumer() //
.topic("persistent://my-tenant/my-ns/my-topic") //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

public class SampleProducer {
public static void main(String[] args) throws PulsarClientException, InterruptedException, IOException {
PulsarClient client = PulsarClient.builder().serviceUrl("http://localhost:6650").build();
PulsarClient client = PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build();

Producer<byte[]> producer = client.newProducer().topic("persistent://my-tenant/my-ns/my-topic").create();

Expand Down

0 comments on commit 757c3f9

Please sign in to comment.