Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
amqplib-retry
Advanced tools
Retry failed attempts to consume a message, with increasing delays between each attempt.
amqplib-retry
Retry failed attempts to consume a message, with increasing delays between each attempt.
$ npm install amqplib-retry --save
(function () {
'use strict';
var Promise = require('bluebird'),
amqplib = require('amqplib'),
retry = require('amqplib-retry'),
CONSUMER_QUEUE = 'example-queue',
FAILURE_QUEUE = 'example-queue.failure';
Promise.resolve(amqplib.connect('amqp://localhost:5672'))
.then(function (conn) {
return conn.createChannel();
})
.tap(function (channel) {
return Promise.all([
channel.assertQueue(CONSUMER_QUEUE, {durable: false, autoDelete: true}),
channel.assertQueue(FAILURE_QUEUE, {durable: false, autoDelete: true})
]);
})
.tap(function (channel) {
var messageHandler = function (msg) {
// no need to 'ack' or 'nack' messages
// messages that generate an exception (or a rejected promise) will be retried
console.log(msg);
};
channel.consume(CONSUMER_QUEUE, retry({
channel: channel,
consumerQueue: CONSUMER_QUEUE,
failureQueue: FAILURE_QUEUE,
handler: messageHandler
//delay: function (attempts) { return 1000; /* milliseconds */ }
}));
});
}());
FAQs
Retry failed attempts to consume a message, with increasing delays between each attempt.
The npm package amqplib-retry receives a total of 188 weekly downloads. As such, amqplib-retry popularity was classified as not popular.
We found that amqplib-retry demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.