Hi, thanks for the response.� Unfortunately, I haven&#39;t really found an answer.<br><br>We upgraded RabbitMQ to 2.4.1, after which Net::RabbitMQ no longer hangs when the remote server is up but the remote app is down.<br>
<br>However, Net::RabbitMQ still returns a false success when the remote server or app goes down after the publisher connects to the local node.� (The queue is located on the remote app.)<br><br>For now, we&#39;ve switched to having a single node.� This decreases our throughput slightly, but at least we don&#39;t risk dropping messages.<br>
<br>I think we must be doing something wrong, but I don&#39;t know what...<br><br>Ronald<br><br><br><div class="gmail_quote">On Tue, May 31, 2011 at 7:41 AM, Alexis Richardson <span dir="ltr">&lt;<a href="mailto:alexis@rabbitmq.com">alexis@rabbitmq.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Ronald<br>
<br>
Were you able to find an answer to this?<br>
<br>
alexis<br>
<div><div></div><div class="h5"><br>
<br>
<br>
On Thu, May 19, 2011 at 9:44 PM, Ronald J Kimball<br>
&lt;<a href="mailto:rkimball@pangeamedia.com">rkimball@pangeamedia.com</a>&gt; wrote:<br>
&gt; I&#39;m trying to understand how RabbitMQ behaves under failure conditions,<br>
&gt; specifically when using the Net::RabbitMQ Perl module.<br>
&gt;<br>
&gt; We have RabbitMQ set up with three nodes, one on the backend, which holds<br>
&gt; the actual queues, and two on the frontend, which receive publish requests.<br>
&gt;<br>
&gt; RabbitMQ 2.2.0<br>
&gt; Net::RabbitMQ 0.1.8<br>
&gt;<br>
&gt;<br>
&gt; Below is the chart of behaviors that I have observed.<br>
&gt;<br>
&gt; &quot;+&quot; means the behavior is as I expected: either the message is successfully<br>
&gt; queued, or an error is thrown.<br>
&gt; &quot;-&quot; means the behavior is not as I expected, but can be managed:<br>
&gt; specifically, the process receives a SIGPIPE, which I can trap and recover<br>
&gt; from.<br>
&gt; &quot;!&quot; means the behavior is not as I expected, and cannot be managed: the<br>
&gt; message is not queued but no error is thrown and/or the process hangs.<br>
&gt;<br>
&gt; &quot;App down&quot; means I ran `rabbitmqctl stop_app`.� &quot;Daemon down&quot; means I ran<br>
&gt; `rabbitmqctl stop`.<br>
&gt;<br>
&gt; � As publishing process starts up:<br>
&gt;<br>
&gt; ��� Remote daemon up, app up<br>
&gt; ����� + Everything okay<br>
&gt;<br>
&gt; ��� Remote daemon up, app down<br>
&gt; ����� ! Net::RabbitMQ hangs when declaring queue<br>
&gt;<br>
&gt; ��� Remote daemon down<br>
&gt; ����� + Net::RabbitMQ throws error when declaring queue<br>
&gt; ������� &quot;Declaring queue: server channel error 404, message: NOT_FOUND - no<br>
&gt; queue &#39;test&#39; in vhost &#39;/&#39;&quot;<br>
&gt;<br>
&gt; ��� Local daemon up, app down<br>
&gt; ����� + Net::RabbitMQ throws error when connecting<br>
&gt; ������� &quot;Opening socket: Connection refused&quot;<br>
&gt;<br>
&gt; ��� Local daemon down<br>
&gt; ����� + Net::RabbitMQ throws error when connecting<br>
&gt; ������� &quot;Opening socket: Connection refused&quot;<br>
&gt;<br>
&gt;<br>
&gt; � After publishing process starts up:<br>
&gt;<br>
&gt; ��� Local app goes down<br>
&gt; ����� - Process receives SIGPIPE<br>
&gt;<br>
&gt; ��� Local daemon goes down<br>
&gt; ����� - Process receives SIGPIPE<br>
&gt;<br>
&gt; ��� Remote app goes down<br>
&gt; ����� ! Net::RabbitMQ falsely indicates success when publishing, then hangs<br>
&gt; (in DESTROY?)<br>
&gt;<br>
&gt; ��� Remote daemon goes down<br>
&gt; ����� ! Net::RabbitMQ falsely indicates success when publishing<br>
&gt;<br>
&gt;<br>
&gt; ��� Local app goes down, comes back up<br>
&gt; ����� - Process receives SIGPIPE<br>
&gt;<br>
&gt; ��� Local daemon goes down, comes back up<br>
&gt; ����� - Process receives SIGPIPE<br>
&gt;<br>
&gt; ��� Remote app goes down, comes back up<br>
&gt; ����� + Everything okay<br>
&gt;<br>
&gt; ��� Remote daemon goes down, comes back up<br>
&gt; ����� + Everything okay<br>
&gt;<br>
&gt;<br>
&gt; Have other people had these problems with Net::RabbitMQ?� Can we resolve<br>
&gt; these issues by changing something in our RabbitMQ configuration?<br>
&gt;<br>
&gt;<br>
&gt; thanks,<br>
&gt; Ronald<br>
&gt;<br>
&gt;<br>
&gt; P.S. Here&#39;s my script.<br>
&gt;<br>
&gt; #!/usr/local/bin/perl<br>
&gt;<br>
&gt; use strict;<br>
&gt; use warnings;<br>
&gt;<br>
&gt; use Net::RabbitMQ;<br>
&gt;<br>
&gt; $| = 1;<br>
&gt;<br>
&gt; $SIG{&#39;PIPE&#39;} = sub { die &quot;SIGPIPE\n&quot; };<br>
&gt;<br>
&gt; my $mq = Net::RabbitMQ-&gt;new();<br>
&gt;<br>
&gt; alarm(10);<br>
&gt;<br>
&gt; print &quot;Connecting\n&quot;;<br>
&gt; $mq-&gt;connect(&#39;localhost&#39;, { user =&gt; &#39;engagement&#39;, password =&gt; &#39;********&#39; })<br>
&gt; � or die &quot;Can&#39;t connect to RabbitMQ\n&quot;;<br>
&gt;<br>
&gt; print &quot;Opening channel\n&quot;;<br>
&gt; $mq-&gt;channel_open(1);<br>
&gt;<br>
&gt; print &quot;Declaring exchange\n&quot;;<br>
&gt; $mq-&gt;exchange_declare(1, &#39;ee_exchange&#39;, { durable =&gt; 1 });<br>
&gt;<br>
&gt; print &quot;Declaring queue\n&quot;;<br>
&gt; $mq-&gt;queue_declare(1, &#39;test&#39;, { durable =&gt; 1 });<br>
&gt;<br>
&gt; print &quot;Binding queue\n&quot;;<br>
&gt; $mq-&gt;queue_bind(1, &#39;test&#39;, &#39;ee_exchange&#39;, &#39;ee_test&#39;);<br>
&gt;<br>
&gt; alarm(0);<br>
&gt;<br>
&gt; print &quot;&gt; &quot;;<br>
&gt; &lt;&gt;;<br>
&gt;<br>
&gt; alarm(10);<br>
&gt;<br>
&gt; print &quot;Publishing message\n&quot;;<br>
&gt; my $rc =<br>
&gt; � $mq-&gt;publish(1, &#39;ee_test&#39;, &#39;hello world!&#39;,<br>
&gt; �������������� { exchange =&gt; &#39;ee_exchange&#39;, mandatory =&gt; 1, immediate =&gt; 0<br>
&gt; },<br>
&gt; �������������� { delivery_mode =&gt; 2 });<br>
&gt; print &quot;Result: $rc\n&quot;;<br>
&gt;<br>
&gt; __END__<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; rabbitmq-discuss mailing list<br>
&gt; <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
&gt; <a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br>