Socket
Socket
Sign inDemoInstall

amqper

Package Overview
Dependencies
24
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.13 to 0.1.14

2

examples/round-robin/consumer.js

@@ -9,5 +9,5 @@ "use strict";

console.log('ready');
client.route('test.a', function (message) {
client.route('test.a', {}, function (message) {
console.log(message.payload);
});
});

@@ -65,7 +65,10 @@ "use strict";

Client.prototype.publish = function (exchange, routingKey, content) {
var channel = this.channel;
var codec = this.codec;
return when.try(function () {
content = bufferify(codec.encode(content));
return channel.publish(exchange, routingKey, content);
var that = this;
return this.$promise.then(function () {
var channel = that.channel;
var codec = that.codec;
return when.try(function () {
content = bufferify(codec.encode(content));
return channel.publish(exchange, routingKey, content);
});
});

@@ -87,16 +90,18 @@ };

var that = this;
var codec = this.codec;
var router = this.context.route(route, options, function (message) {
when.try(function () {
message.payload = codec.decode(message.content);
return handler(message);
}).done(function () {
return message.ack();
}, function (err) {
debug('error', 'Error thrown in routing handler, not acking message. Error: ', err.stack);
that.emit('error', err);
return this.$promise.then(function () {
var codec = that.codec;
var router = that.context.route(route, options, function (message) {
when.try(function () {
message.payload = codec.decode(message.content);
return handler(message);
}).done(function () {
return message.ack();
}, function (err) {
debug('error', 'Error thrown in routing handler, not acking message. Error: ', err.stack);
that.emit('error', err);
});
});
that.routers.push(router);
return router.$promise;
});
this.routers.push(router);
return router.$promise;
};

@@ -103,0 +108,0 @@

{
"name": "amqper",
"version": "0.1.13",
"version": "0.1.14",
"description": "A simple and elegant AMQP client for node based on amqplib.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/taoyuan/amqper",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc