Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
itp-amqp-node
Advanced tools
A lightweight AMQP client for Node.js
npm install itp-amqp-node
const AMQPProducer = require('itp-amqp-node').AMQPProducer;
const producer = new AMQPProducer({
exchange: 'itp.demo',
exchange_type: 'topic',
amqp_uri: process.env.RABBITMQ_URI || 'amqp://localhost'
});
producer.start()
.then(() => {
console.log('Connected to producer');
}, (err) => {
console.error('Error while connecting to producer', err);
});
try {
const routing_key = 'key.hello_world';
const message = JSON.stringify('Hello World');
producer.publish(routing_key, new Buffer(message));
} catch (err) {
console.error('Error while connecting to producer', err);
}
const AMQPConsumer = require('itp-amqp-node').AMQPConsumer;
class ConsoleConsumer extends AMQPConsumer {
handleMessage (msg, resolve, reject) {
try {
const jsonMsg = msg.content.toString('utf-8');
console.log(JSON.parse(jsonMsg));
resolve();
} catch (e) {
console.error(e);
reject(e);
}
}
}
const opts = {
exchange : 'itp.demo',
exchange_type : 'topic',
amqp_uri : process.env.RABBITMQ_URI || 'amqp://localhost',
routing_key : 'key.hello_world'
};
const ConsoleConsumer = new ConsoleConsumer(opts);
consoleWorker.start();
ITP-AMQP-Node is freely distributable under the terms of the MIT license.
FAQs
A lightweight AMQP client for Node.js.
The npm package itp-amqp-node receives a total of 0 weekly downloads. As such, itp-amqp-node popularity was classified as not popular.
We found that itp-amqp-node 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.