[rabbitmq-discuss] Difference between get and consume.
alan.antonuk at gmail.com
Tue Mar 13 17:44:38 GMT 2012
basic.get is synchronous call which the client asks the broker: "are there
any messages in this queue, if so please give me one".
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 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).
On Tue, Mar 13, 2012 at 12:40 PM, Jacques du Rand <jacquesdr at gmail.com>wrote:
> Hi guys.
> 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?
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss