To publish messages to RabbitMQ (acknowledged, persistent) from a NodeJS publisher (I'm using bramqp, but the question is generic), what should be channel pooling strategy?
If I create a huge pool (20,000 +) and look out for a free channel every time I need to publish, and then free the channel whenever I get an acknowledgement (keeping in free pool), then at high loads, acknowledgements are delayed, so a high number of channels get created, causing a rapid increase in erlang processes in RabbitMQ, degrading its performance.
If I manage with a very small pool, or no pool, then as soon as the rate is high, socket error is thrown, at which the only option is to reset the complete connection.
What's the best practice here?