You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i'm confused with two apis.
ai i know, consumer will allocate a thread pool by default to listen the msg.
but according to the examples,i see while (1) instead.i think i can use amqp_basic_get to substitute amqp_basic_consum
so i want to know ,in rabbitmq-c, what's the key difference between amqp_basic_get and amqp_basic_consume.
The text was updated successfully, but these errors were encountered:
amqp_basic_get() exercises the basic.get AMQP method. Basic.get is a pull-API, meaning the client asks the broker for a single message from a queue and if the broker has a message it is delivered. For basic.get you have to continuously send the basic.get method to the broker asking for any new messages.
amqp_basic_consume() exercises the basic.consume AMQP method. Basic.consume is a push-API, meaning the client tells the broker, please send me a message when you have one for me, until I tell you to stop, the messages are delivered to the client asynchronously..
These methods are not interchangeable - they do different things.
FYI: rabbitmq-c current does not use a thread-pool to handle message delivery, everything is done on one thread.
i'm confused with two apis.
ai i know, consumer will allocate a thread pool by default to listen the msg.
but according to the examples,i see while (1) instead.i think i can use amqp_basic_get to substitute amqp_basic_consum
so i want to know ,in rabbitmq-c, what's the key difference between amqp_basic_get and amqp_basic_consume.
The text was updated successfully, but these errors were encountered: