
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
foo-foo-mq
Advanced tools
This is a very opinionated abstraction over amqplib to help simplify the implementation of several messaging patterns on RabbitMQ.
!Important! - successful use of this library will require a conceptual knowledge of AMQP and an understanding of RabbitMQ.
This contrived example is here to make it easy to see what the API looks like now that documentation is broken up across multiple pages.
const rabbit = require('foo-foo-mq');
rabbit.handle('MyMessage', (msg) => {
console.log('received msg', msg.body);
msg.ack();
});
rabbit.handle('MyRequest', (req) => {
req.reply('yes?');
});
rabbit.configure({
connection: {
name: 'default',
user: 'guest',
pass: 'guest',
host: 'my-rabbitmq-server',
port: 5672,
vhost: '%2f',
replyQueue: 'customReplyQueue'
},
exchanges: [
{ name: 'ex.1', type: 'fanout', autoDelete: true }
],
queues: [
{ name: 'q.1', autoDelete: true, subscribe: true },
],
bindings: [
{ exchange: 'ex.1', target: 'q.1', keys: [] }
]
}).then(
() => console.log('connected!');
);
rabbit.request('ex.1', { type: 'MyRequest' })
.then(
reply => {
console.log('got response:', reply.body);
reply.ack();
}
);
rabbit.publish('ex.1', { type: 'MyMessage', body: 'hello!' });
setTimeout(() => {
rabbit.shutdown(true)
},5000);
FAQs
Abstractions to simplify working with the RabbitMQ
The npm package foo-foo-mq receives a total of 1,768 weekly downloads. As such, foo-foo-mq popularity was classified as popular.
We found that foo-foo-mq demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.