Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
A simple and elegant AMQP client written by TypeScript
Inspired by amqp-ts
import * as amqp from 'amqpr';
// const amqp = require("amqpr"); // js require
async function run() {
const connection = new amqp.Connection('amqp://localhost');
const exchange = connection.declareExchange('ExchangeName');
const queue = connection.declareQueue('QueueName');
await queue.bind(exchange);
await queue.consume(message => {
console.log('Message received: ' + message.getContent());
});
// it is possible that the following message is not received because
// it can be sent before the queue, binding or consumer exist
const msg = new amqp.Message('Test');
exchange.send(msg);
await connection.ready();
// the following message will be received because
// everything you defined earlier for this connection now exists
const msg2 = new amqp.Message('Test2');
exchange.send(msg2);
}
run().catch(console.error);
More examples can be found in the tutorials directory.
connection.connected
: Returns true if the connection exists and false, otherwise.connection.online()
: Resolved when connected.connection.ready()
: Resolved when connected and all resources(actors) has been ready.When the library detects that the connection with the AMQP server is lost, it tries to automatically reconnect to the server.
It is powered by connback.
FAQs
A simple and elegant AMQP client
The npm package amqpr receives a total of 0 weekly downloads. As such, amqpr popularity was classified as not popular.
We found that amqpr 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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.