<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div>Hello Awesome Kamailio Community,</div>
<div>We are writing on behalf of 2600hz, where we have been using Kamailio for some time now and are very pleased with our results! So, seems time to commit something back, dontchya think?</div>
<div><br>
</div>
<div>We would like to present to you a new module, to hopefully be included in master.   We call it db_kazoo (although a new name is fine too).</div>
<div><br>
</div>
<div>db_kazoo is a general purpose AMQP connector (connects to our rabbitmq-server). It exposes publish/consume capabilities into Kamailio. Why is this amazing, you ask? Well even if you didn’t ask, we will explain…</div>
<div><br>
</div>
<div>From a high-level, the purpose of the module might be for things like:</div>
<div>- Integrate to an AMQP application to make real-time routing decisions (instead of using, say, a SQL database)</div>
<div>- Provide a real-time integration into your program, instead of your database, so you can overlay additional logic in your preferred language while also utilizing a message bus</div>
<div>- Utilize messaging to have a distributed messaging layer, such that machines processing requests/responses/events can go up/down or share the workload and your Kamailio node will still be happy</div>
<div><br>
</div>
<div><br>
</div>
<div>With this module, someone can:</div>
<div>1 - publish json payloads to rabbitmq</div>
<div>2 - publish json payloads to rabbitmq and wait for correlated response message</div>
<div>3 - subscribe to an exchange with a routing key</div>
<div><br>
</div>
<div>The module works with a main forked process that does the communication with rabbitmq for issuing publishes, waiting for replies and consuming messages. When it consumes a message it defers the process to a worker process so that it doesn't block this
 main process.</div>
<div><br>
</div>
<div>The worker process issues an event-route where we can act on the received payload. The name of the event-route is composed by values extracted from the payload.</div>
<div><br>
</div>
<div>Consumed messages have the option of being acknowledge in two ways:</div>
<div>1 - immediately when received </div>
<div>2 - after processing by the worker</div>
<div><br>
</div>
<div>One unique feature of our implementation revolves around failover of the message bus itself. In our design, the module supports multiple RabbitMQ servers and will fallback from one to the next in a list of RabbitMQ servers if the connection fails to the
 current connected server. When using acknowledge in db_kazoo with clustering in RabbitMQ, we have simulated and experienced full reconnects while in the middle of processing pending messages. In this way, when we get disconnected from one server we proved
 that, even at high speeds, we are able to connect to the next in the list and continue interacting with our application.</div>
<div><br>
</div>
<div>We have run a variety of sipp load tests on this module and believe it is ready for prime time. We monitored memory, response accuracy and overall stability and it seemed OK. But we would, of course, love for others to help us find what we have missed,
 or contribute more features, or overall just use the work we slaved over for so many hours. Or just make comments and suggestions!</div>
<div><br>
</div>
<div>If nothing else, we hope we’ve provided something useful to the Kamailio community, as you all have provided useful items to us.</div>
<div><br>
</div>
<div>Thanks to everyone for all the work on Kamailio and related products.</div>
<div><br>
</div>
<div>Look forward to hearing from you all.</div>
<div><br>
</div>
<div>This is our first formal / large contribution to Kamailio so if we’ve done something wrong process, code or otherwise please let us know!</div>
<div><br>
</div>
</div>
</body>
</html>