<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.E-postmall17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">It’s not HA specific but in general a clustering issue. As far as I can tell, it’s a miss in the AMQP 0.9.1 specification, but luckily there is a RabbitMQ specific
extension called “consumer cancellation”: <a href="http://www.rabbitmq.com/consumer-cancel.html">
http://www.rabbitmq.com/consumer-cancel.html</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">RabbitMQ 2.8 broker supports that, the question is if your client does.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Tobias<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Från:</span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> rabbitmq-discuss-bounces@lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces@lists.rabbitmq.com]
<b>För </b>Guillermo López Leal<br>
<b>Skickat:</b> den 4 september 2013 22:55<br>
<b>Till:</b> rabbitmq-discuss@googlegroups.com<br>
<b>Ämne:</b> [rabbitmq-discuss] Connections made to slaves when a master fail (and a slave is promoted) stop receiving messages<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi guys,<br>
<br>
after complaining about RabbitMQ HA mode in twitter[1], I got a response by Álvaro (@old_sound)[2] stating that I should post my problem here. Fair enough, here are my details:<br>
<br>
Architecture: simple RabbitMQ 2.8.x cluster with two machines. <br>
Usage: really simple pub-sub on a topic. Nothing fancy. Queues on 'all' mirroring.<br>
Library: node-amqp for Node.js [3], v0.1.7, as published on npm, not on github)<br>
<br>
The symptons are:<br>
<br>
1) We connect to several logical brokers from each of our nodes. This means that we are connected to the master and slaves of each queue.<br>
2) When the master fails, RabbitMQ selects the eldest slave and promotes to be the master.<br>
3) "The slave considers all previous consumers to have been abruptly disconnected."[4] So we end up with the connections NOT being closed but not binded to any queue, and no information from RabbitMQ to the "slave" consumers. This means that we have the connection,
we do not have any error message, but we stop receiving any further messages.<o:p></o:p></p>
<div>
<p class="MsoNormal"><br>
I have read the documentation and I think this is the expected behaviour, but I'm more than open to improve our code to solve this problems.<br>
<br>
Thanks,<br>
<br>
Guillermo<br>
<br>
<br>
[1] <a href="https://twitter.com/willyaranda/status/375343649896538112">https://twitter.com/willyaranda/status/375343649896538112</a><br>
[2] <a href="https://twitter.com/old_sound/status/375353677319376896">https://twitter.com/old_sound/status/375353677319376896</a><br>
[3] <a href="https://github.com/postwait/node-amqp">https://github.com/postwait/node-amqp</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">[4] <a href="http://www.rabbitmq.com/ha.html">http://www.rabbitmq.com/ha.html</a><o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>