<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 6 Sep 2012, at 12:03, Tim Watson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 6 Sep 2012, at 11:39, Sajith Kariyawasam wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi all, <div><br></div><div>My requirement is to read a message from an AMQP based broker queue, using a C Client. </div><div><br></div><div>I tested the samples found in <a target="_blank" href="http://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Falanxz%2Frabbitmq-c&sa=D&sntz=1&usg=AFQjCNEMwRO8OLSNeNdnSc0ZrkktMhO50A" style="text-decoration:none;color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px">https://github.com/alanxz/rabbitmq-c</a>, there I'm more interested in amqp_listenq.c programme.</div></blockquote><blockquote type="cite">
<div><br></div><div>But my requirement is to run this client periodically, should not continuously listen to the message queue (as in this example). I need to read just a simple message and out put the text content of that message.</div>
<div><br></div></blockquote><div><br></div></div></div></blockquote><div><br></div><div>Someone pointed out that you're after basic.get though. If you are *just* trying to pull 1 message off the queue and then terminate the program, then just drop the loops. </div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Does amqp_consumer.c not do more of what you're interested in?</div><br></div></div></blockquote><div><br></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><br></div></div></body></html>