mqemitter-child-process
Share the same mqemitter between a hierarchy of child processes
Install
npm install mqemitter-child-process --save
Example
This example spins up 2 processes, and run the mqemitter in the master.
'use strict' var childProcess = var cp = if processconnected else cpstart { if err throw err for var i = 0; i < 2; i++ childProcess } { var client = cp if processpid % 2 === 0 client else }
API
mqemitterChildProcess.start()
mqemitterChildProcess.stop()
mqemitterChildProcess.unref()
mqemitterChildProcess.child()
mqemitterChildProcess.start()
Starts the master mqemitter for this process.
mqemitterChildProcess.stop()
Stops the master mqemitter for this process.
mqemitterChildProcess.unref()
Calls unref()
on the main server
mqemitterChildProcess.chil()
Creates a MQEmitter child that connects to the master.
License
MIT