Socket
Socket
Sign inDemoInstall

@highoutput/amqp

Package Overview
Dependencies
Maintainers
2
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@highoutput/amqp - npm Package Compare versions

Comparing version 0.5.14 to 0.6.0

3

build/index.d.ts

@@ -25,3 +25,2 @@ import Client, { ClientOptions } from './lib/client';

private container;
private connection;
private workers;

@@ -31,3 +30,5 @@ private clients;

private subscribers;
private _connection?;
constructor(options?: Partial<AmqpOptions>);
private get connection();
createClient<TInput extends any[] = any[], TOutput = any>(queue: string, options?: Partial<ClientOptions>): Promise<{

@@ -34,0 +35,0 @@ (...args: TInput): Promise<TOutput | null>;

@@ -35,18 +35,23 @@ "use strict";

logger_1.default.tag(['amqp', 'options']).info(ramda_1.default.omit(['password'], this.options));
this.connection = this.container.connect(Object.assign(Object.assign({}, this.options), { reconnect: true, initial_reconnect_delay: this.options.initialReconnectDelay, max_reconnect_delay: this.options.maxReconnectDelay }));
this.connection.setMaxListeners(100);
this.connection.on('connection_open', () => {
logger_1.default.info('connection established');
});
this.connection.on('connection_close', () => {
logger_1.default.info('connection closed');
});
this.connection.on('connection_error', (context) => {
var _a;
logger_1.default.error((_a = context.error) === null || _a === void 0 ? void 0 : _a.message);
});
this.connection.on('disconnected', () => {
logger_1.default.info('disconnected');
});
}
get connection() {
if (!this._connection) {
this._connection = this.container.connect(Object.assign(Object.assign({}, this.options), { reconnect: true, initial_reconnect_delay: this.options.initialReconnectDelay, max_reconnect_delay: this.options.maxReconnectDelay }));
this.connection.setMaxListeners(100);
this.connection.on('connection_open', () => {
logger_1.default.info('connection established');
});
this.connection.on('connection_close', () => {
logger_1.default.info('connection closed');
});
this.connection.on('connection_error', (context) => {
var _a;
logger_1.default.error((_a = context.error) === null || _a === void 0 ? void 0 : _a.message);
});
this.connection.on('disconnected', () => {
logger_1.default.info('disconnected');
});
}
return this._connection;
}
async createClient(queue, options) {

@@ -94,6 +99,7 @@ const client = new client_1.default(this.connection, `${this.options.prefix || ''}${queue}`, options);

]);
this.connection.close();
await new Promise((resolve) => {
const promise = new Promise((resolve) => {
this.connection.once('connection_close', resolve);
});
this.connection.close();
await promise;
}

@@ -100,0 +106,0 @@ }

{
"name": "@highoutput/amqp",
"version": "0.5.14",
"version": "0.6.0",
"description": "A simplified abstraction of the AMQP 1.0 protocol",

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

},
"gitHead": "42e1cf5de0aaa4d0c91571969bfd04a98ee27505"
"gitHead": "28da4cfd830812899fde70e29fb96bb69d2729c3"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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