The amqp_consume_message() function in amqp_consume.c provides a good example how to correctly use amqp_simple_wait_frame_noblock(). https://github.com/alanxz/rabbitmq-c/blob/master/librabbitmq/amqp_consumer.c#L136