title: RabbitMQ & NodeJS: Following '1 connection per app, 1 channel per thread, 1 consumer per channel' guideline
body: <p>I'm using NodeJS and <a href="https://github.com/squaremo/amqp.node" rel="nofollow noreferrer">amqplib</a> to build a simple job queueing library (somewhat similar to <a href="https://github.com/hunterloftis/jackrabbit" rel="nofollow noreferrer">Jackrabbit)</a> to be used in a service that should parse pretty large feeds containing information about a lot of different events.</p>
  
  <p>After the information is parsed, it gets distributed to thousands of queues (the queue is the smallest unit where message order has to be respected) and then consumed by my queueing library. </p>
  
  <p>The question is: how do I follow the '1 connection per app, 1 channel per thread, 1 consumer per channel' guideline in this case? It would cause thousand of processes to be spawned, wasting huge amounts of memory and resources.</p>
  
  <p>Note: The number of messages in each of the queues is not very high: about 1-2 msg/sec at most</p>