[Java-client] Invalid hostname : pulsar_e2e:6650,but curl http://pulsar_e2e:8080 is ok #19714
Answered
by
laglangyue
laglangyue
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
laglangyue
Mar 5, 2023
Replies: 2 comments
-
test code PulsarClient client = PulsarClient.builder()
.serviceUrl("pulsar://pulsar_e2e:6650").build();
Consumer<String> subscribe = client.newConsumer(Schema.STRING)
.topic("topic-it")
.subscriptionName("hello-world")
.subscribe();
Message<String> receive = subscribe.receive();
System.out.println(receive.getValue()); |
Beta Was this translation helpful? Give feedback.
0 replies
-
I solve the question, |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tisonkun
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I solve the question,
_
in hostname is invalid