<div dir="ltr"><div>Hello Olle,</div><div><br></div>I may eventually create a sample config, but there are still a few things missing. However, the htable integration alone has enabled us personally to replicate things like call profiles (for concurrent call limiting), failed authentication attempts, etc. across a cluster of servers without having to define the other node addresses anywhere in the config.<div>
<br></div><div>Generally, peers are registered from directly within other modules at startup (see htable for example). Then at the beginning of config you would add something like...</div>
<div><br></div><div><div>        if (method == "KDMQ") {</div><div>                dmq_handle_message();</div><div>        }<br></div></div><div><br></div><div>...and the dmq module would pass the message directly to the already registered peer for internal handling.</div>

<div><br></div><div>However, each peer is uniquely identified by the user part of the request URI, so it is equally possible to send an arbitrary message from within config on one server and handle it directly in config of others, like:</div>

<div><br></div><div>(Sending side)<br></div><div><br></div><div>        dmq_bcast_message("custom_peer_name", "Some serialized data...", "text/plain");</div><div><br></div><div>(Receiving side)</div>
<div><br></div><div><div>        if (method == "KDMQ") {</div><div><div>                if ($rU == "custom_peer_name") {</div><div>                        #do something here</div><div>                } else {</div>
<div>                        #pass it on to be handled by pre-registered peer</div><div>                        dmq_handle_message();</div><div>                }</div></div><div>        }<br></div></div><div><br></div><div>
<div>The serialization/deserialization of the body content is entirely up to the module developer (in code) or server administrator (in config). It can be anything - or nothing. Currently in the config, we're using it to replicate PUBLISHes, although I plan to integrate dmq into the presence module directly in the very near future. Then there is no need for anything special in the config, just like htable is now - other than setting modparam to enable it of course.<br>
</div></div><div><br></div><div><br></div><div>Best regards,</div><div>Charles</div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 25 February 2014 21:03, Olle E. Johansson <span dir="ltr"><<a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><br>
><br>
><br>
> dmq: added function to broadcast message from config file.<br>
><br>
</div>THanks,<br>
<br>
This commit caused me to re-read the DMQ docs as I am happy to see that it is starting to move forward again as a module. What I fail to understand at this point is how incoming messages are handled. I see a handler but then - what?<br>

<br>
The doc says something about using a library for serialization... Of what?<br>
<br>
How can this be used in a normal configuration example?<br>
Can event_routes be added to handle incoming messages like normal messages?<br>
<br>
I feel there's a diamond hidden in there somewhere, and fail to find it ;-)<br>
<span class=""><font color="#888888"><br>
/O<br>
</font></span><div class=""><div class="h5"><br>
<br>
_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>
</div></div>

<br>
<font face="Helvetica, Arial, sans-serif"><font size="2"><span style="font-size:10pt"><a href="http://www.sipcentric.com/" title="blocked::http://www.sipcentric.com/" target="_blank">www.sipcentric.com</a><br>
            <br>
            Follow us on twitter <a href="http://twitter.com/sipcentric" title="blocked::http://twitter.com/sipcentric" target="_blank">@sipcentric</a><br>
            <br>
            <font color="gray">Sipcentric Ltd.
                Company registered in England & Wales no. 7365592.</font> <font color="gray">Registered
                office: Unit 10 iBIC, Birmingham Science Park, Holt Court South, Birmingham B7 4EJ.</font></span></font></font>