
Research
/Security News
DuckDB npm Account Compromised in Continuing Supply Chain Attack
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
@package/pubsub
Advanced tools
wrapper around amqplib to help expediate basic stuffs.
>$ npm install @package/pubsub
@package/pubsub>$ npm test
if you want to convert @package/pubsub into es5, you can simply run:
@package/pubsub>$ npm run build
creates a connection.
import {create_connection} from '@package/pubsub';
// use an alternate port
let conn = yield create_connection({ port : 5673 });
create a channel, assert passed queues in handlers
Object into existence and add their callbacks — if any — as consumers.
import {create_connection, init_channel} from '@package/pubsub';
let conn = yield create_connection;
let channel = yield init_channel(conn, {
// assert queue into existence and consume any messages published to it
'queue.name.1' : function* (channel, msg) {
let data = msg.content.toString();
console.log(msg);
// if you want to remove this message from the queue
channel.ack(data);
},
// assert queue into existence only
'queue.name.2' : true
});
broadcast a message to the passed queue.
import {create_connection, init_channel, broadcast} from '@package/pubsub';
let conn = yield create_connection;
let channel = yield init_channel(conn, {
'queue.name.1' : function* (channel, msg) {
let data = JSON.parse(msg.content.toString());
let res = yield doSomethingTo(data);
channel.ack(msg);
// broadcast the new message to a different queue
yield broadcast(channel, 'queue.name.2', res);
},
'queue.name.2' : true
});
remove the passed queues, will not throw an Error if a queue does not exist.
import {conn, destroy_queue} from '@package/pubsub';
let conn = yield create_connection;
yield destroy_queue(conn, 'queue.name.1', 'queue.name.2');
FAQs
easy peasy rabbitmq
We found that @package/pubsub demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.