[sr-dev] [kamailio/kamailio] nats module subscriber issue when connected to more "nats_urls" (Issue #2916)

Stefan Mititelu notifications at github.com
Thu Nov 4 14:59:29 CET 2021


### Description, Troubleshooting, Reproduction

I have 3  go nats servers running and the following kamailio config for nats:
```
modparam("nats", "nats_url", "nats://127.0.0.1:4222")
modparam("nats", "nats_url", "nats://127.0.0.2:4222")
modparam("nats", "nats_url", "nats://127.0.0.3:4222")

modparam("nats", "subject_queue_group", "foo:2020")
...

event_route[nats:foo]
{
                xlog("L_ERR", "==============> received $natsData");
}
```
I try to publish using some nats publisher (e.g. nats.c example/libuv-pub.c), and nothing gets printed in event route:
```
./pub -s nats://127.0.0.1:4222 -txt "aaaaaaaaaaaa" -count 1 // event route log NOT printed
./pub -s nats://127.0.0.2:4222 -txt "aaaaaaaaaaaa" -count 1 // event route log NOT printed
``` 

However, if I try to publish on the last server "127.0.0.3", log *is* printed:
```
./pub -s nats://127.0.0.3:4222 -txt "aaaaaaaaaaaa" -count 1 // event route log IS printed
```

I expected to see 1 log message for each of the above publish(es). Found this while implementing and testing #2915 

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/issues/2916
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20211104/7a633d6b/attachment.htm>


More information about the sr-dev mailing list