0

I am developing an application where I am listing to incoming RabbitMQ messages. I am using Node.JS and the amqplib library. As my process manager I use pm2. I am listening to a topicExchange from RabbitMQ and there a multiple variants of topics that will be created like *.*, foo.*, *.bar, foo.bar.

When receiving the event from RabbitMQ my script is making an follow up http request afterwards with different payload based on the topic key.

I am asking myself now is there any difference in regards to performance if I loop all possible topicKeys in one script / one pm2 process and create n-new channels / connections to RabbitMQ within one process or should I create multiple pm2 processes where each pm2 process listens / creates only one new channel to a single topicKey.

If I create multiple pm2 instances of my listeners I would use more RAM but would it be faster?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Bernd Loigge
  • 1,647
  • 1
  • 14
  • 17

0 Answers0