amqplib
amqplib copied to clipboard
Allow highWaterMark for Channel to be configured
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.
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();