'Is there a way to programmatically dequeue messages from a queue when using RabbitMQ?

In all the examples I have found, the consumer is listening all the time and just automatically receives the message however, I was wondering if there's a way I can manually consume messages only so until I consume the message, it'll remain in the queue.

Is this possible? If so, how?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source