[sr-dev] [kamailio/kamailio] nats: Add publish function (PR #2915)

Stefan Mititelu notifications at github.com
Fri Nov 5 14:15:09 CET 2021


re-updated PR to add callbacks to publisher connections; right now the publisher callbacks are the same as the subscriber callbacks.

Thus, kamailio nats module can make use of nats lib reconnection(e.g. natsOptions_SetRetryOnFailedConnect() function) and not implement a reconnect mechanism by itself.

I will later make a new PR to make the parameters that control nats lib reconnect mechanism, configurable:
```
        natsOptions_SetMaxReconnect(opts, 10000); // how many times nats lib tries to reconnect before giving up; -1 is forever if i'm not wrong
        natsOptions_SetReconnectWait(opts, 2 * 1000); // the interval between reconnect retries
```

Thanks,
Stefan

-- 
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/pull/2915#issuecomment-961885703
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20211105/abe4781a/attachment-0001.htm>


More information about the sr-dev mailing list