[sr-dev] [kamailio/kamailio] rabbitmq: Add new module (#786)

Stefan Mititelu notifications at github.com
Fri Oct 7 10:20:53 CEST 2016


@gaaf there are actually 2 conditions that consider breaking out of reconnect loop on success:

1'st one, on success, will succeed opening channel, thus will never go further:
```
// open channel - failed
if (log_ret != AMQP_RESPONSE_NORMAL) {
...
}
```

2'nd one:
```
// reconnect
if (reconnect_attempts < max_reconnect_attempts) {
...
}
```

I tried again this scenario using kamailio with 1 spawned child and I can see only 1 "LM_ERR("SUCCESS: rabbitmq_reconnect()\n");" for multiple calls, after reconnect.

The reason you may see multiple logs of that kind is because the amqp connection is **per child process**. However, the reconnect is tried only for a specific child, when it tries to _publish()/publish_consume(). 

Hope this was helpful.

-- 
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/786#issuecomment-252180828
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20161007/eba960a2/attachment.html>


More information about the sr-dev mailing list