[sr-dev] [kamailio/kamailio] nats module subscriber issue when connected to more "nats_urls" (Issue #2916)
Emmanuel Schmidbauer
notifications at github.com
Sun Nov 14 23:10:27 CET 2021
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 or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2916#issuecomment-968372896
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20211114/6096c70f/attachment.htm>
More information about the sr-dev
mailing list