Skip to content

d19n-llc/node-mq

Repository files navigation

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);

About

A nodejs pub / sub message queue and internal job queue.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published