pulsar-client-go icon indicating copy to clipboard operation
pulsar-client-go copied to clipboard

[feature request] Client support set ServiceUrlProvider

Open shibd opened this issue 3 years ago • 4 comments

Motivation

This is an earlier feature of the Pulsar java client and has no related PIP.

Refer to Java client PR: https://github.com/apache/pulsar/pull/2543

Alternatives

Anything else?

shibd avatar Dec 30 '22 04:12 shibd

Hi @shibd,

I can take this issue and send a PR. Will you be able to review? Thanks

ksankeerth avatar Jan 23 '23 14:01 ksankeerth

Hi @shibd,

I can take this issue and send a PR. Will you be able to review? Thanks

Great! This API is being discussed in the community, so follow this stack: https://lists.apache.org/thread/cojz6qxpc7v0j8vy0w476ttt0f89zr3z

shibd avatar Feb 05 '23 12:02 shibd

Hi @shibd, I can take this issue and send a PR. Will you be able to review? Thanks

Great! This API is being discussed in the community, so follow this stack: https://lists.apache.org/thread/cojz6qxpc7v0j8vy0w476ttt0f89zr3z

Hi @shibd,

Thanks for pointing me to the discussions. I went through old Java PR and discussions. What I understood is that there are some new suggestions to get rid of ServiceUrlProvider.

As per last comment from the thread,

Oh, thanks Baodi - now I understand what he meant by "calling rebuild". I agree, it's not very intuitive.

Maybe?

client.update(ConnectionInfo.builder() .setServiceUrl() .set...() .build())

We are going to expose client.update() method to users. Detecting serviceURL's change is also user's responsibility. When they detect and change it, they have to re-build a new client by calling client.update(ConnectionInfo.builder()

Is my understanding correct?

Thanks!

ksankeerth avatar Feb 13 '23 11:02 ksankeerth

Yes, It is also necessary to expose the updateAuthentication and updateTlsTrustCertsFilePath interface.

According to the Community PIP Rules, We need to push a PIP and wait for the vote passed.

I will push PIP on next week, After waiting for it to pass, we can code.

shibd avatar Feb 13 '23 12:02 shibd