<div dir="ltr">Emile,<div><br></div><div>I started a plugin which main logic is the gen_server here:�<a href="https://gist.github.com/videlalvaro/6819225">https://gist.github.com/videlalvaro/6819225</a></div><div><br></div>
<div>As you can see it will subscribe to mnesia system events and also it will listen into the amq.rabbitmq.log exchange.</div><div><br></div><div>The problem is that when I make other nodes join the cluster, it will not always receive the message from the amq.rabbitmq.log exchange, also the mnesia system events appear to not always be broadcasted.</div>
<div><br></div><div>Any ideas on what I might be doing wrong?</div><div><br></div><div>Regards,</div><div><br></div><div>Alvaro</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 23, 2013 at 4:06 AM, Emile Joubert <span dir="ltr">&lt;<a href="mailto:emile@rabbitmq.com" target="_blank">emile@rabbitmq.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Hi Alvaro,<br>
<div class="im"><br>
On 21/09/13 02:53, Alvaro Videla wrote:<br>
<br>
&gt; Is there a way for a plugin to know when a node joins or leaves the<br>
&gt; cluster?<br>
<br>
</div>A plugin could subscribe to Mnesia system events that will report when<br>
Mnesia stops and starts on nodes:<br>
�<a href="http://www.erlang.org/doc/apps/mnesia/Mnesia_chap5.html#id76679" target="_blank">http://www.erlang.org/doc/apps/mnesia/Mnesia_chap5.html#id76679</a><br>
<br>
Depending on the kind of plugin you are writing you could use the<br>
information sent to the log exchange (amq.rabbitmq.log) to determine<br>
when nodes leave and join.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
-Emile<br>
<br>
<br>
<br>
</font></span></blockquote></div><br></div>