How do i set the prefetch count to one for amqplib in nodejs? link to Lib on git
The desired result is that the consumer is only taking one message from the queue process it and when done take a new message. I have a setup where some messages takes long time to process and others take very short time. Hence i do not just want to share the messages equally on all consumers.
I used ch.prefetch(1); after asserting the queue with a task and before binding the queue to an exchange.