<div dir="ltr">Well I should add that I'm using PHP and the PECL bindings for the rabbitmq-c library. So I've been able to determine the exact repro steps.<div style>1. get (no_ack off)</div><div style>2. ack</div>
<div style>3. get again, the connection drops, the message gets redelivered</div><div style><br></div><div style>The exact same code connecting to rabbitmq 3.0.4 does not have this problem so I'm guessing something broke with the PHP bindings or rabbitmq-c between versions. I leave room for a misconfiguration of rabbitmq on my part but other than setting up a user/password and giving it full access to the / vhost I didn't do much configuration on either. Here is the code I'm using:</div>
<div style><br></div><div style>Producer:<br><div><?php</div><div><br></div><div>$co = new AMQPConnection();</div><div>$co->setLogin('user');</div><div>$co->setPassword('password');</div><div>$co->setTimeout(60);</div>
<div>$co->connect();</div><div><br></div><div>$ch = new AMQPChannel($co);</div><div><br></div><div>$ex_name = 'test_exchange';</div><div>$ex = new AMQPExchange($ch);</div><div>$ex->setName($ex_name);</div><div>
$ex->setType(AMQP_EX_TYPE_DIRECT);</div><div>$ex->declare();</div><div><br></div><div>$q_name = 'test_queue';</div><div>$q = new AMQPQueue($ch);</div><div>$q->setName($q_name);</div><div>$q->setFlags(AMQP_DURABLE);</div>
<div>$q->declare();</div><div>$q->bind($ex_name, $q_name);</div><div><br></div><div>$ex->publish('test_message'.microtime(true), $q_name);</div><div><br></div><div style>Consumer:</div><div style><div><?php</div>
<div><br></div><div>$co = new AMQPConnection();</div><div>$co->setLogin('user');</div><div>$co->setPassword('password');</div><div>$co->setTimeout(0);</div><div>$co->connect();</div><div><br></div>
<div>$ch = new AMQPChannel($co);</div><div><br></div><div>$ex_name = 'test_exchange';</div><div>$ex = new AMQPExchange($ch);</div><div>$ex->setName($ex_name);</div><div>$ex->setType(AMQP_EX_TYPE_DIRECT);</div>
<div>$ex->declare();</div><div><br></div><div>$q_name = 'test_queue';</div><div>$q = new AMQPQueue($ch);</div><div>$q->setName($q_name);</div><div>$q->setFlags(AMQP_DURABLE);</div><div>$q->declare();</div>
<div>$q->bind($ex_name, $q_name);</div><div><br></div><div>while (true) {</div><div> //$envelope = $q->get(AMQP_AUTOACK);</div><div> $envelope = $q->get();</div><div> if ($envelope) {</div><div> echo $envelope->getBody() ."\n";</div>
<div> $q->ack($envelope->getDeliveryTag());</div><div> $envelope = false;</div><div> }</div><div>}</div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 16, 2013 at 9:48 AM, Michael Klishin <span dir="ltr"><<a href="mailto:michael.s.klishin@gmail.com" target="_blank">michael.s.klishin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="im"><br><div class="gmail_quote">2013/5/16 Billy Hand <span dir="ltr"><<a href="mailto:billythethird@gmail.com" target="_blank">billythethird@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm using a short program I wrote that generates exactly one message.</blockquote></div><br></div>Can you post the code (of both the producer and consumers)?<span class="HOEnZb"><font color="#888888"><br>-- <br>MK<br>
<br><a href="http://github.com/michaelklishin" target="_blank">http://github.com/michaelklishin</a><br>
<a href="http://twitter.com/michaelklishin" target="_blank">http://twitter.com/michaelklishin</a><br>
</font></span></div></div>
<br>_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<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>
<br></blockquote></div><br></div>