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

harcon-amqp

Package Overview
Dependencies
Maintainers
1
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

harcon-amqp - npm Package Compare versions

Comparing version 2.4.0 to 2.5.0

19

lib/AmqpBarrel.js

@@ -13,2 +13,6 @@ 'use strict'

amqpbarrel.nodeNO = function ( comm ) {
return 1
}
amqpbarrel.createIn = function ( division, entityName, callback ) {

@@ -35,3 +39,3 @@ let self = this

// console.log('<><><>', division, entityName )
socket.connect( division, entityName + '.*', function ( ) {
socket.connect( division, entityName + '.' + self.nodeSeqNo, function ( ) {
self.logger.harconlog( null, 'AMQP SUBSCRIBE socket is made.', { division: division, entity: entityName }, 'info' )

@@ -69,2 +73,4 @@

self.nodeSeqNo = config.nodeSeqNo || 1
self.connectURL = config.connectURL || 'amqp://localhost'

@@ -135,2 +141,3 @@ self.socketType = 'PUBSUB' // PUSHWORKER || PUBSUB || PUSHPULL

let realComm = Communication.importCommunication( comm.comm )
realComm.nodeSeqNo = comm.nodeSeqNo || 1

@@ -164,6 +171,7 @@ if ( !comm.response ) {

let entityName = comm.source // event.substring(0, comm.event.indexOf('.') )
let packet = JSON.stringify( { id: comm.id, comm: comm, err: err ? err.message : null, response: true, responseComms: responseComms || [] } )
let packet = JSON.stringify( { id: comm.id, comm: comm, nodeSeqNo: self.nodeSeqNo, err: err ? err.message : null, response: true, responseComms: responseComms || [] } )
self.logger.harconlog( null, 'Appeasing...', {comm: comm, err: err ? err.message : null, responseComms: responseComms}, 'silly' )
self.outs[ comm.sourceDivision ].publish( entityName + '.1', packet, 'utf8')
let nodeNO = comm.nodeSeqNo || self.nodeNO( comm )
self.outs[ comm.sourceDivision ].publish( entityName + '.' + nodeNO, packet, 'utf8')
}

@@ -190,4 +198,5 @@

let entityName = comm.event.substring(0, comm.event.indexOf('.') )
let packet = JSON.stringify( { id: comm.id, comm: comm, callback: !!comm.callback } )
self.outs[ comm.division ].publish( entityName + '.1', packet, 'utf8')
let packet = JSON.stringify( { id: comm.id, comm: comm, nodeSeqNo: self.nodeSeqNo, callback: !!comm.callback } )
let nodeNO = comm.nodeSeqNo || self.nodeNO( comm )
self.outs[ comm.division ].publish( entityName + '.' + nodeNO, packet, 'utf8')
}

@@ -194,0 +203,0 @@

{
"name": "harcon-amqp",
"version": "2.4.0",
"version": "2.5.0",
"description": "AMQP plugin for the harcon messaging/service bus of node-based enterprise entities.",

@@ -27,3 +27,3 @@ "keywords": [

"async": "^1.5.2",
"harcon": "^3.11.0",
"harcon": "^3.20.0",
"rabbit.js": "^0.4.4"

@@ -30,0 +30,0 @@ },

@@ -99,3 +99,3 @@ 'use strict'

// Sending a greetings message with 2 parameters and waiting for the proper answer
inflicter.ignite( clerobee.generate(), '', 'Marie.simple', 'whatsup?', 'how do you do?', function (err, res) {
inflicter.ignite( clerobee.generate(), null, '', 'Marie.simple', 'whatsup?', 'how do you do?', function (err, res) {
should.not.exist(err)

@@ -110,3 +110,3 @@ should.exist(res)

// Sending a greetings message with 2 parameters and waiting for the proper answer
inflicter.ignite( clerobee.generate(), '', 'greet.simple', 'whatsup?', 'how do you do?', function (err, res) {
inflicter.ignite( clerobee.generate(), null, '', 'greet.simple', 'whatsup?', 'how do you do?', function (err, res) {
// console.log( err, res )

@@ -126,3 +126,3 @@ should.not.exist(err)

// Sending a morning message and waiting for the proper answer
inflicter.ignite( clerobee.generate(), '', 'morning.wakeup', function (err, res) {
inflicter.ignite( clerobee.generate(), null, '', 'morning.wakeup', function (err, res) {
// console.log( err, res )

@@ -137,3 +137,3 @@

it('General dormir', function (done) {
inflicter.ignite( clerobee.generate(), '', 'morning.dormir', function (err, res) {
inflicter.ignite( clerobee.generate(), null, '', 'morning.dormir', function (err, res) {
// console.log( err, res )

@@ -148,3 +148,3 @@

it('Specific dormir', function (done) {
inflicter.ignite( clerobee.generate(), '', 'morning.girls.dormir', function (err, res) {
inflicter.ignite( clerobee.generate(), null, '', 'morning.girls.dormir', function (err, res) {
// console.log( err, res )

@@ -161,3 +161,3 @@

this.timeout(5000)
inflicter.ignite( clerobee.generate(), '', 'cave.echo', function (err, res) {
inflicter.ignite( clerobee.generate(), null, '', 'cave.echo', function (err, res) {
expect(err).to.be.an.instanceof( Error )

@@ -190,3 +190,3 @@ expect(res).to.be.a('null')

it('Division Promise test', function (done) {
inflicter.ignite( clerobee.generate(), harconName + '.click', 'greet.simple', 'Hi', 'Ca vas?' )
inflicter.ignite( clerobee.generate(), null, harconName + '.click', 'greet.simple', 'Hi', 'Ca vas?' )
.then( function ( res ) {

@@ -209,3 +209,3 @@ should.exist(res)

// Sending a morning message and waiting for the proper answer
inflicter.ignite( clerobee.generate(), harconName + '.click', 'greet.simple', 'Hi', 'Ca vas?', function (err, res) {
inflicter.ignite( clerobee.generate(), null, harconName + '.click', 'greet.simple', 'Hi', 'Ca vas?', function (err, res) {
// console.log( err, res )

@@ -242,3 +242,3 @@

inflicter.deactivate('Claire')
inflicter.ignite( clerobee.generate(), harconName + '.click', 'greet.simple', 'Hi', 'Ca vas?', function (err, res) {
inflicter.ignite( clerobee.generate(), null, harconName + '.click', 'greet.simple', 'Hi', 'Ca vas?', function (err, res) {
// console.log( err, res )

@@ -245,0 +245,0 @@

@@ -11,9 +11,9 @@ var async = require('async')

function (cb) {
ignite( 0, '', 'Julie.dormir', cb )
ignite( 0, null, '', 'Julie.dormir', cb )
},
function (cb) {
ignite( 0, '', 'greet.gentle', 'It is morning!', 'Time to wake up!', cb )
ignite( 0, null, '', 'greet.gentle', 'It is morning!', 'Time to wake up!', cb )
},
function (cb) {
ignite( 1, self.division + '.click', 'Claire.simple', 'It is morning!', 'Time to wake up!', cb )
ignite( 1, null, self.division + '.click', 'Claire.simple', 'It is morning!', 'Time to wake up!', cb )
}

@@ -20,0 +20,0 @@ ], callback )

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