
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Version 0.3.x introduces new functionality and many bug fixes over v0.2.x. It also introduces some minor changes to packet format and thus is not backwards compatable with v0.2.x
MongoMQ is a messaging queue built on top of Node.js and MongoDB's tailable cursors. It allows for distributed of messages across workers in both a single reciever and broadcast method.
MongoMQ does NOT (currently) support callback's once a message is processed. Instead it is recommended that you use a one time listener to pickup responses if this is required.
Starts the queue listener and sets up the emitter.
Params:
Stops listening for messages and closes the emitter.
Params:
Places the a message of msgTye on the queue with the provided data for handlers to consume.
Params:
Sets up a listener for a specific message type.
Params:
options -
Provides back an array of listeners that matche the supplied event. Returns an empty array if no listeners are subscribed to the event.
Params:
Shuts down the first listener that matches the supplied event and handler and removes it from the listeners list.
Params:
Shuts down ALL listeners for the specified event and removes them from the listeners list.
Params:
MongoMQ sets up a tailable collection and then starts listeners using find in conjunction with findAndModify to pickup messages out of this collection.
Since MongoMQ is basically a wrapper around MongoDB's built in support for tailable cursors it is possible to place listeners built in other langauges on the "queue".
You should see the two listeners pickup messages one at a time with whoever has resources to process picking up the message first.
var MongoMQ = require('../lib/MongoMQ').MongoMQ;
var repl = require('repl');
var queue = new MongoMQ({
autoStart: true
});
var r = repl.start({
prompt: "testbed>"
});
r.on('exit', function(){
queue.stop();
});
var msgidx = 0;
r.context.send = function(){
queue.emit('test', msgidx);
msgidx++;
};
r.context.load = function(){
for(var i = 0; i<100; i++){
queue.emit('test', msgidx);
msgidx++;
}
};
var logMsg = function(err, data, next){
console.log('LOG: ', data);
next();
};
var eatTest = function(err, data, next){
console.log('eat: ', data);
next();
};
r.context.logAny = function(){
queue.onAny(logMsg);
};
r.context.listen = function(){
queue.on('test', eatTest);
};
r.context.start = function(cb){
queue.start(cb);
};
r.context.stop = function(){
queue.stop();
};
r.context.help = function(){
console.log('Built in test methods:\r\n'+
' help() - shows this message\r\n'+
' logAny() - logs any message to the console\r\n'+
' eatTest() - consumes next available "test" message from the queue\r\n'+
' send() - places a "test" message on the queue\r\n'+
' load() - places 100 "test" messages on the queue\r\n'+
' start() - start the queue listener\r\n'+
' stop() - stop the queue listener\r\n'+
'\r\nInstance Data\r\n'+
' queue - the global MongoMQ instance\r\n'
);
return '';
};
/*
queue.start(function(){
r.context.eatTest();
});
*/
r.context.queue = queue;
r.context.help();
{
_id: ObjectId(), // for internal use only
pkt_ver: 3, // Packet version that this message is being sent in
event: event, // string that represents what type of event this is
data: message, // Contains the actual message contents
handled: false, // states if the message has been handled or not
localTime: dt, // Local Date Time of when the message was put on the queue
globalTime: new Date(dt-self.serverTimeOffset), // Date Time offset to server time of when the message was put on the queue
pickedTime: new Date(dt-self.serverTimeOffset), // Date Time offset to server time of when the message was picked up from the queue
host: string, // Contains the host name of the machine that initiated the event
[response_id: string] // optional if the event expects response(s) this will be the conversation identifier used to track those responses
}
v0.3.4
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.10&v0.2.11
v0.2.9
v0.2.8
v0.2.7
v0.2.6
v0.2.5
v0.2.4
v0.2.3
v0.2.2
v0.2.1
v0.1.1
v0.1.0
FAQs
MongoMQ v0.3.x ==============
We found that mongomq demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.