[rabbitmq-discuss] Simple C Client to read from a Queue

Tim Watson tim at rabbitmq.com
Thu Sep 6 12:23:47 BST 2012


On 6 Sep 2012, at 12:11, Tim Watson wrote:
> 
> 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. ;)

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.

amqp_rpc_reply_t amqp_basic_get(amqp_connection_state_t state,
				amqp_channel_t channel,
				amqp_bytes_t queue,
				amqp_boolean_t no_ack)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120906/61cbf786/attachment.htm>


More information about the rabbitmq-discuss mailing list