Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@techloop/amqp-broker

Package Overview
Dependencies
Maintainers
8
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@techloop/amqp-broker - npm Package Compare versions

Comparing version 1.3.6 to 1.3.7

30

lib/broker.js

@@ -15,3 +15,3 @@ if (!process.env.EXCHANGE_NAME) {

`Queue ${name}.${
bindTo
bindTo
} binded successfully`

@@ -29,2 +29,3 @@ );

this.connection = null;
this.exchange = null;
}

@@ -34,3 +35,3 @@

console.log(`Queue ${q.name} was opened`);
this.set("q", q);
this.set('q', q);
const onQueueBind = this.opts.onQueueBind;

@@ -67,4 +68,4 @@ const parseIncomingMessage = this.parseIncomingMessage.bind(this);

}
set("connection", connection);
set("exchange", exchange);
set('connection', connection);
set('exchange', exchange);
const options = { autoDelete: false, durable: true };

@@ -105,6 +106,19 @@ connection.queue(process.env.QUEUE_NAME, options, (q) => { onQueueOpen(false, q) });

console.log('Found matching Task: ', Task)
Task.callback({
msg: data,
key: deliveryInfo.routingKey
});
try {
Task.callback({
msg: data,
key: deliveryInfo.routingKey
});
} catch (error) {
console.error(`Error: failed to run callback for task key=${deliveryInfo.routingKey}`, error);
if (Task.handleFailedMessages) {
const failureRoutingKey = `failed.${Task.key}`;
this.exchange.publish(failureRoutingKey, data, {}, (err) => {
console.error('Can not publish message', err)
});
}
}
}

@@ -111,0 +125,0 @@ }

{
"name": "@techloop/amqp-broker",
"version": "1.3.6",
"version": "1.3.7",
"description": "AMQP broker for microservices communication",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc