Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not support multi pulsar cluster addresses #177

Closed
hailin0 opened this issue Jan 20, 2020 · 4 comments · Fixed by #484
Closed

Not support multi pulsar cluster addresses #177

hailin0 opened this issue Jan 20, 2020 · 4 comments · Fixed by #484

Comments

@hailin0
Copy link
Member

hailin0 commented Jan 20, 2020

Is your feature request related to a problem? Please describe.
not support the use of pulsar cluster addresses?

Describe the solution you'd like

client, err := pulsar.NewClient(pulsar.ClientOptions{
    URL: "pulsar://p1.pulsar.com:6650,pulsar://p2.pulsar.com:6650,pulsar://p3.pulsar.com:6650",
})

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@wolfstudy wolfstudy changed the title not support pulsar cluster addresses Not support multi pulsar cluster addresses Feb 1, 2020
@wolfstudy
Copy link
Member

Thanks @hailin0 feedback.

Currently, the go-client not support multi URL in NewClient().

@cgfork
Copy link
Contributor

cgfork commented Apr 16, 2020

m

@izackwu
Copy link
Contributor

izackwu commented May 22, 2020

@wolfstudy

Hi, I'm interested in this issue. But I can't fully understand why multi pulsar cluster addresses are needed for a client.

In Pulsar's doc, service discovery section, I find that

Clients connecting to Pulsar brokers need to be able to communicate with an entire Pulsar instance using a single URL.

So why do we need multi cluster addresses in the client?

@ernado
Copy link

ernado commented Aug 17, 2020

I was following this documentation:
http://pulsar.apache.org/docs/en/deploy-bare-metal/

There is

brokerServiceurl=pulsar://host1:6650,host2:6650,host3:6650

Tried there with go client and got error:

dial tcp: address 10.0.0.4:6650,10.0.0.5:6650,10.0.0.3:6650: too many colons in address

So we need multiple addresses to support high availability deployments without DNS.

wolfstudy pushed a commit that referenced this issue Mar 9, 2021
Fixes #177 

Master Issue apache/pulsar#3218

### Motivation

add multiple hosts support to go client

### Modifications

- add service uri & service name resolver
- add service name resolver to lookup service & rpc client
- add unit tests
- add integration tests

### Verifying this change

- [ ] Make sure that the change passes the CI checks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants