-
Notifications
You must be signed in to change notification settings - Fork 194
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
Client does not handle connect URL containing multiple servers #545
Comments
Aren't you using a string instead of a list here ? e.g., |
Produces:
|
Based on the code Line 21 in ae09ea4
Looks you should do nats.connect(["nats://demo1.nats.io:4222", "nats://demo2.nats.io:4222"]) |
Duh. Thank you for pointing that out. I'm changing this from 'defect' to (on the plus side, just got a lot easier if someone wants to submit a PR!) |
Don't think we should be splitting on delimited strings, we accept lists. |
@caspervonb I think this is fine to add though so that it is closer to what the go client does |
Parity with other clients is also why I'd (soft) suggest adding this. |
Observed behavior
Providing more than one server URL to connect to results in an error.
This works:
This does not:
It throws an error:
Expected behavior
For parity with other clients, multiple server URLs should be accepted
Server and client version
nats-py-2.7.2
(current release)Server version is not relevant.
Host environment
Python 3.11.3
The rest is not relevant
Steps to reproduce
Create a connection with a string that contains multiple server URLs, e.g.:
nats.connect("nats://demo1.nats.io:4222,nats://demo2.nats.io:4222,")
The text was updated successfully, but these errors were encountered: