0

My situation requires that the next message will only start processing after the previous one finishes processing. (The message processing function is an async function).

RabbitMQ fits my needs with Single Active Consumer functionality and by setting prefetch to 1. About Single Active Consumer

  • A queue is declared and some consumers register to it at roughly the same time.
  • The very first registered consumer become the single active consumer: messages are dispatched to it and the other consumers are ignored.
  • The single active consumer is cancelled for some reason or simply dies. One of the registered consumer becomes the new single active consumer and messages are now dispatched to it. In other terms, the queue fails over automatically to another consumer.

, but it cannot be installed via npm.

Are there any alternative queue systems that does this and can be installed via npm?

As my reply to @paulsm4 The reason I don't consider RabbitMQ at this moment is because I plan to deploy my app to Heroku and would like to keep it as simple as possible without the need to use a third party RabbitMQ addon. However, I will use Redis anyways so any library that depends on Redis is fine.

shapeare
  • 4,133
  • 7
  • 28
  • 39
  • Q: Are you really looking for an NPM that *implements* message queueing? Wouldn't you prefer to look for a NodeJS library that *uses* RabbitMQ? – paulsm4 Dec 19 '21 at 03:17
  • I try to deploy my app to heroku, so I would like to keep it as simple as possible without the need to use a third-party RabbitMQ add-on. However, I will need Redis anyways, so any library that depends on Redis is fine. – shapeare Dec 19 '21 at 03:19

0 Answers0