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

antenna-amqp

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antenna-amqp - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

19

lib/bus.js

@@ -119,2 +119,4 @@ /**

q.removeListener('error', onQueueError);
self.address = qname;
self._subscribe(qopts, function(err) {

@@ -197,2 +199,17 @@ if (err) { return self.emit('error', err); }

Bus.prototype.direct = function(addr, msg, options, cb) {
if (typeof options == 'function') {
cb = options;
options = undefined;
}
options = options || {};
// AMQP uses period ('.') separators rather than slash ('/')
addr = addr.replace(/\//g, '.');
options.deliveryMode = (options.deliveryMode === undefined) ? NONPERSISTENT_MODE : options.deliveryMode;
this._connection.publish(addr, msg, options);
if (cb) { return process.nextTick(cb); }
}
/**

@@ -277,2 +294,4 @@ * Subscribe to messages of `topic` broadcast on the bus.

var m = new Message(message, headers, deliveryInfo);
m.bus = self;
self.emit('message', m);

@@ -279,0 +298,0 @@ }).addCallback(function(ok) {

8

lib/message.js

@@ -11,4 +11,8 @@ /**

if (deliveryInfo.contentType) { this.headers['content-type'] = deliveryInfo.contentType; }
// TODO: only set body if it has been parsed, otherwise set `data`
this.body = message;
if (Buffer.isBuffer(message.data)) {
this.data = message.data;
} else {
this.body = message;
}
}

@@ -15,0 +19,0 @@

{
"name": "antenna-amqp",
"version": "0.1.1",
"version": "0.1.2",
"description": "AMQP adapter for Antenna.",

@@ -5,0 +5,0 @@ "keywords": [

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