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

Is discovery server mandatory ? #87

Open
yoletx opened this issue Oct 6, 2022 · 3 comments
Open

Is discovery server mandatory ? #87

yoletx opened this issue Oct 6, 2022 · 3 comments

Comments

@yoletx
Copy link

yoletx commented Oct 6, 2022

Is your feature request related to a problem? Please describe.
When creating a producer / consummer, we have to specify a discovery server.

Describe the solution you'd like
I would like to directly specify the broker, and not a discovery server.

Additional context
I'm quite new to pulsar, so maybe i'm completly wrong.
But currently, when trying to establish a connexion, it successfuly connect to the remote server :
"Authentication to discovery service established, now will lookup topic", and then find me a localhost url, that can't work because everything is on the remote server.

{"level":"INFO","timestamp":"2022-10-06T09:04:03.388Z","logger":"pulsar-flex","message":"Creating client connection for producer to topic: persistent://public/default/MY_TOPIC"}
{"level":"INFO","timestamp":"2022-10-06T09:04:03.389Z","logger":"pulsar-flex","message":"Starting to lookup topic persistent://public/default/MY_TOPIC on __________________________________:6650"}        
{"level":"INFO","timestamp":"2022-10-06T09:04:03.417Z","logger":"pulsar-flex","message":"Connected successfully __________________________________:6650, now sending connect command."}
{"level":"INFO","timestamp":"2022-10-06T09:04:03.444Z","logger":"pulsar-flex","message":"Authentication to discovery service established, now will lookup topic"}
{"level":"INFO","timestamp":"2022-10-06T09:04:03.467Z","logger":"pulsar-flex","message":"Closing connection to discovery connection"}
{"level":"INFO","timestamp":"2022-10-06T09:04:03.469Z","logger":"pulsar-flex","message":"Lookup succeeded, owner is localhost:6650"}
Error: connect ECONNREFUSED 127.0.0.1:6650
@galrose
Copy link
Collaborator

galrose commented Oct 11, 2022

The discovery server is a pulsar broker.
I'm not sure why it searches for localhost I would check some cluster configurations :)

@yoletx
Copy link
Author

yoletx commented Oct 11, 2022

Some more explanation.
Our pulsar server is in standalone.
We don't have a discovery service running.
I made some tests yesterday and found a workaround, it looks ok, but seem a little strange.
On pulsar server conf, the parameter advertisedAddress was no set. If not set it equal to localhost.
So i set this to the external hostname (same that i use when passing discoveryServers parameter in new Producer) and it's ok.
Conclusion is :
Maybe pulsar-flex should be able to directly contact broker server without "searching for advertisedAddress parameter on the server".
Why ? Because JAVA library allow this (our server was used by external JAVA producer without problems and without having to set advertisedAddress in the conf.)

@galrose
Copy link
Collaborator

galrose commented Oct 11, 2022

That's interesting, we also have a standalone for the tests here so you could see if there are any differences there. It makes sense though, I'll take a look at it. Thanks for the info :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants