amqplib icon indicating copy to clipboard operation
amqplib copied to clipboard

Allow highWaterMark for Channel to be configured

Open arei opened this issue 8 years ago • 1 comments

It appears as if the highWaterMark setting for the channel write stream cannot be configured. freshChannel() does take an options object that it gets highWaterMark from, but new Channel(), createChannel() and createChannelConfirm() do not take options nor pass options through to freshChannel().

Setting highWaterMark may be desirable in some high volume systems.

arei avatar Aug 03 '16 15:08 arei

Sadly no upvotes or changes in 5 years (

May be it helps someone, we use this code to increase high water mark:

const TestChannel = await connection.createChannel();
TestChannel.__proto__.allocate = function() {
 this.ch = this.connection.freshChannel(this, {highWaterMark: 50000});
 return this;
};
await TestChannel.close();

const channel = await connection.createChannel();

AsidStorm avatar Jan 29 '21 12:01 AsidStorm