<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>On 6 Sep 2012, at 12:11, Tim Watson wrote:</div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><font class="Apple-style-span" color="#000000"><br></font></div><div>No, the listenq.c sample is the one you want. It really does seem that you're trying to get someone to write your C code for you though - as I said, just remove the looping - and whilst we are very keen to help with rabbit questions, I suspect this might be going a bit far even for the more enthusiastic among us. ;)</div></div></div></blockquote><br></div><div>In fact looking at the sources for a couple of minutes now, you'll be better off using amqp_basic_get. I didn't notice that at first. There didn't seem to be an example of using that in the repository, so I now understand why you were struggling to see what to do. The returns a amqp_rpc_reply_t struct, from which you can probably get you want via the reply field.</div><div><br></div><div><pre><div class="line" id="LC212"><span class="n">amqp_rpc_reply_t</span> <span class="nf">amqp_basic_get</span><span class="p">(</span><span class="n">amqp_connection_state_t</span> <span class="n">state</span><span class="p">,</span></div><div class="line" id="LC213">                                <span class="n">amqp_channel_t</span> <span class="n">channel</span><span class="p">,</span></div><div class="line" id="LC214">                                <span class="n">amqp_bytes_t</span> <span class="n">queue</span><span class="p">,</span></div><div class="line" id="LC215">                                <span class="n">amqp_boolean_t</span> <span class="n">no_ack</span><span class="p">)</span></div></pre></div><div><br></div></body></html>