@d19n/node-mq

1.10.13 • Public • Published

Distributed micro service master / slave election manager

This package is developed for Nodejs applications using PM2 as a runtime process manager.

Reason for developing this package

If you have 4 applications running in production and want to schedule cron jobs they will run X 4.

This package allows you to identify the current master application in your network and process the job once.

A master node is a healthy instance.

Usage

.env file add the following

MQ_MONGODB_URL= MQ_MONGODB_NAME=

In your application import

const {isMasterNode} = require("@d19n/node-mq);

Package Sidebar

Install

npm i @d19n/node-mq

Weekly Downloads

69

Version

1.10.13

License

ISC

Unpacked Size

50.4 kB

Total Files

33

Last publish

Collaborators

  • alexgbdev
  • hellboysrb
  • estevao.procopio
  • liam12345
  • stevandric
  • ftruglio
  • marko-s17
  • yfsamuel