
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@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.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.