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

fh-amqp-js

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fh-amqp-js - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

20

lib/amqpjs.js

@@ -86,2 +86,22 @@ var amqp = require('amqp');

// Publish task to a queue
this.publishTask = function(exchangeName, qName, message, callback){
var self = this;
exchange(exchangeName, function(err, exchange){
if(err) return callback(err);
// TODO - opts can obviously be passed in in future.. important here tho that the deliveryMode is persistent(2)
var opts = {
contentType: 'application/json',
deliveryMode: 2
};
exchange.publish(qName, message, opts, function(ack){
// Note: oddly, ack will be false if the message succeeds
if (ack !== false) return callback("Error publishing task to queue, ack: " + ack);
return callback();
});
});
};
// Subscribe to messages on a topic

@@ -88,0 +108,0 @@ // 'subscribeFunc' is the function that gets called each time a message happens

2

package.json
{
"name": "fh-amqp-js",
"version": "0.2.3",
"version": "0.2.4",
"description": "FeedHenry AMQP Client",

@@ -5,0 +5,0 @@ "main": "./lib/amqpjs.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