pulsar-beat-output icon indicating copy to clipboard operation
pulsar-beat-output copied to clipboard

[FEATURE] support : Multiple advertised listeners

Open Robustshouhualee opened this issue 1 year ago • 5 comments

backgroup

This tool currently does not support the configuration of :multiple converted listeners for pulsar. When the client's network environment is a combination of internal and external IPs, some network environments do not support writing to pulsar。

expect

Expect community authors to support this feature,thx。

Reference

https://pulsar.apache.org/docs/next/concepts-multiple-advertised-listeners/

Robustshouhualee avatar May 30 '24 04:05 Robustshouhualee

please look this issue。 @xuthus5 @tuteng @zhongxp1219

Robustshouhualee avatar May 30 '24 04:05 Robustshouhualee

Could you help to support this? thanks. @tuteng @shoothzj

thetumbled avatar May 30 '24 08:05 thetumbled

Do you want to make the ClientOptions.ListenerName parameter support configurable? https://github.com/apache/pulsar-client-go/blob/2d51323103a65ba522dc73f56f052cc81d663245/pulsar/client.go#L133 @Robustshouhualee

xuthus5 avatar May 30 '24 12:05 xuthus5

Do you want to make the ClientOptions.ListenerName parameter support configurable? https://github.com/apache/pulsar-client-go/blob/2d51323103a65ba522dc73f56f052cc81d663245/pulsar/client.go#L133 @Robustshouhualee

It seems that the pulsar go client has support for configuring ListenerName, what should we do in this project if we want to configure it?

thetumbled avatar May 30 '24 12:05 thetumbled

Change the struct pulsarConfig and add a field such as:

ListenerName string `config:"listener_name"`

https://github.com/streamnative/pulsar-beat-output/blob/e180e577d8992cb883b20687f749afdb8cfb8bb9/pulsar/config.go#L41

change function initOptions add condition:

if config.ListenerName != "" {
    clientOptions.ListenerName = config.ListenerName
}

https://github.com/streamnative/pulsar-beat-output/blob/e180e577d8992cb883b20687f749afdb8cfb8bb9/pulsar/config.go#L129

then change xxx.yaml add listener_name = {listener_name } to test.

xuthus5 avatar May 30 '24 12:05 xuthus5