This sounds like a nice improvement, I submitted a PR to move the connection handling into a new struct. We can extend it into a linked-list by doing something like this:
I think we should leave the default behavior of relying on libnats to do connection failover based on the server list it is given, and define a "name" on the connection to create simultaneous connections.
perhaps using something similar to htable like
modparam("nats", "nats_url", "nats://127.0.0.1:4222;name=connection1")
modparam("nats", "nats_url", "nats://127.0.0.1:5222;name=connection1")
modparam("nats", "nats_url", "nats://127.0.0.1:6222;name=connection2")
This would create two sets of connections.
"connection1" would contain server list of nats://127.0.0.1:4222
and nats://127.0.0.1:5222
"connection2" would contain server list of nats://127.0.0.1:6222
We could then reference the connections by name in other modparams or functions.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.