No channels left to allocate
pico21 opened this issue · 3 comments
RabbitMQ 3.8.11, Erlang 23.2.3
With Rascal version >=17, I get the error No channels left to allocate after initializing some subscriptions, whereas with version 16.x, this error doesn't occur
Rascal.Broker.create(Rascal.withDefaultConfig(this.config), function (err, broker) {
...
_.each(self.subscriptionNames, function (subscriptionName) {
...
broker.subscribe(subscriptionName, { prefetch: 3 }, function (err, subscription) {
if (err) {
logger.debug(`[BS] Rascal.Broker.subscribe error: ${err}`)
process.exit(1);
}
...
}
...
}
Based on my comments in #219 I suspect you are using a connection url in the config, and not specifying a channelMax. Prior to v17 rascal ignored the default channelMax in this case. I made the decision from v17 onwards to apply the default values if they were not overiden in the connection url. If this sounds like it might explain the problem, then add a url request parameter channelMax=65535
to restore the previous behaviour. You might also be able to specify channelMax=0
but I'm not 100% sure without testing.
thank you, it work also with channelMax=0