basic.get is synchronous call which the client asks the broker: "are there any messages in this queue, if so please give me one".<div><br></div><div>basic.consume is a synchronous call that starts an asynchronous behavior: it tells the broker, "please deliver to me the messages in this queue until I say stop". The messages can then arrive from the broker at any point in the future.</div>
<div><br></div><div>The rabbitmq-c library does have a function to do basic.get (amqp_basic_get). The rabbitmq-c also has a function to start and stop a consumer (amqp_basic_consume and amqp_basic_cancel). However it does not have an API to deal with consuming messages. You will need to loop examining amqp frames as they come in and decide how to piece them together as their delivered (check the amqp_consumer.c example for details). </div>
<div><br></div><div>-Alan<br><br><div class="gmail_quote">On Tue, Mar 13, 2012 at 12:40 PM, Jacques du Rand <span dir="ltr"><<a href="mailto:jacquesdr@gmail.com">jacquesdr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p>Hi guys. <br>
I recently learnd that the c library when using basic get is also blocking. In php its non blocking. What then is the difference between basicget and consume? At a c lib level? <br>
Regards<span class="HOEnZb"><font color="#888888"><br>
Jacques</font></span></p>
<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>