Reputation: 2621
I would like to use the node-amqp library the create multiple consumers for RabbitMQ, but I can't understand whether the prefetch-count
option refers to count per consumer or not. I would like each consumer to have its own prefetch count that does not depend on other consumers.
Thanks.
Upvotes: 1
Views: 4279
Reputation: 10192
Can be per single consumer but can be set for multiple consumers at once. Just look for title Example - single consumer here. So AMQP supports it. I'm not sure for the library you've mentioned but on official java lib it is like that - transparent towards AMQP's basic.qos method. Also from the aforementioned link
Note that the default value for the global flag is false in most APIs
and for rabbitmq when global==false
prefetch_count is applied separately to each new consumer on the channel
so you would need to find out how it's implemented in that librabry.
Additionaly consider using amqp.node library, since this one is used on rabbimtq tutorials. (EDIT I only now see that Derick Bailey has mentioned that already.)
Upvotes: 2