Comparing version 3.1.0 to 3.1.1
@@ -41,2 +41,6 @@ const net = require('net'); | ||
if (forkId === 'master') { | ||
return sockmq.emit(eventName, eventName, payload); | ||
} | ||
if (!clients[forkId]) { | ||
@@ -127,2 +131,3 @@ return; | ||
/* | ||
setInterval(function () { | ||
@@ -135,2 +140,3 @@ if (this._type.match(/writer/)) { | ||
}.bind(socket), 1000); | ||
*/ | ||
} | ||
@@ -137,0 +143,0 @@ |
{ | ||
"name": "sockmq", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Socket (TCP/IPC) based JSON Message for NodeJS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,13 +6,24 @@ # SockMQ | ||
[](https://travis-ci.org/franck34/sockmq) | ||
[](https://opensource.org/licenses/mit-license.php) | ||
----------- | ||
Alternative to exchange JSON messages between one or more nodejs childs (fork or process), | ||
on the same machine or remote machines (TCP will be used in this case) | ||
Alternative to "process.send" to exchange messages between one or more nodejs childs (fork or process), | ||
on the same machine or remote machines (TCP should be used in this case) | ||
It break process.send existing system limits, bypasssing an unfixed bug in nodejs (oct 2017) | ||
This module break process.send existing system limits, bypasssing an unfixed bug in nodejs (oct 2017) | ||
https://github.com/nodejs/node/issues/9706 | ||
By default, json-stream is used. On the same box, better choice is json-stream over ipc. | ||
------------------- | ||
By default, json-stream is used, and you stay with it. Got a performance issue with msgpack (see bellow). | ||
On the same machine, better choice is json-stream over ipc (default) | ||
With remote machines, better choice is json-stream over tcp | ||
(you should specify "transport" attribute to "tcp" for clients and server). | ||
------------------- | ||
**WARNING** about performances if you enable msgpack option ! | ||
@@ -22,2 +33,20 @@ (look at number of events and speed. Note that when using msgpack, if you go upper than 1000 events, | ||
------------- | ||
Installation: | ||
``` | ||
npm install sockmq | ||
``` | ||
------------- | ||
Examples: | ||
``` | ||
take a look at examples directory for basic usage | ||
``` | ||
------------- | ||
Tests below has been made on | ||
@@ -161,2 +190,4 @@ * Dell Precision 7510 | ||
Cheers ! | ||
Please open a ticket for any improvements/bugs. | ||
Franck |
26910
565
191