<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div><div><div>Hey everyone,</div></div></div><div><br></div><div>I am doing something wrong, and I could use some help. &nbsp;I maintain/develop the PHP extension that interfaces with RabbitMQ via the rabbitmq-c library. We have implemented all of the low level calls, but have also added some helpful wrappers to let poor PHP users not have to deal with all the complexity of the protocol. One of these wrapper methods is AMQPQueue::getMessages(). Unfortunately, I have built a bug I don�t know how to squash.</div><div>During the second call to the AMQPQueue::getMessages() function within a loop (reusing connection and channel), the process get stuck in busy wait. In the attached file on line 37, we call amqp_basic_qos() to prevent any prefetching by the server. That call goes through the following stack in rabbitmq-c:&nbsp;</div><div><br></div><div>librabbitmq/amqp_framing.c:1999: amqp_basic_qos</div><div>librabbitmq/amqp_socket.c:356: amqp_simple_rpc_decoded</div><div>librabbitmq/amqp_socket.c:264:&nbsp;amqp_simple_rpc</div><div>librabbitmq/amqp_socket.c:157: wait_frame_inner</div><div><br></div><div>And then it gets stuck in that while(1) loop. This is where I am a n00b. I was wondering if someone would be so kind as to review the attached code to see if there is anything obviously stupid I am doing before I go into writing an example in C to highlight my stupidity.</div><div><br></div><div>Any help would be much appreciated.</div><div><br></div><div>Thanks,</div><div>Pieter</div></body></html>