Open chad-oliver opened 10 years ago
you can with https://github.com/dropbox/amqp-coffee
It's not the cleanest, but you can do it, see https://github.com/postwait/node-amqp/blob/master/lib/queue.js#L51
var methods = require('amqp/lib/definitions').methods;
queue.connection._sendMethod(queue.channel, methods.basicQos,
{ reserved1: 0
, prefetchSize: 0
, prefetchCount: 1234
, global: false
});
It wouldn't be too hard to extract this method and add it to the queue prototype if there's an appetite for it.
Is it possible to dynamically update the prefetchCount after you have subscribed to a queue? I have a need to adjust the prefetchCount based on downstream capacity.