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

@coolgk/amqp

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coolgk/amqp - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

2

amqp.d.ts
/*!
* @package @coolgk/utils
* @version 1.1.1
* @version 1.1.2
* @link https://www.npmjs.com/package/@coolgk/utils

@@ -5,0 +5,0 @@ * @license MIT

/*!
* @package @coolgk/utils
* @version 1.1.1
* @version 1.1.2
* @link https://www.npmjs.com/package/@coolgk/utils

@@ -5,0 +5,0 @@ * @license MIT

@@ -1,1 +0,1 @@

{"name":"@coolgk/amqp","version":"1.1.1","author":"Daniel Gong <daniel.k.gong@gmail.com>","homepage":"https://www.npmjs.com/package/@coolgk/utils","bugs":{"url":"https://github.com/coolgk/utils/issues"},"repository":{"type":"git","url":"https://github.com/coolgk/utils.git"},"description":"a simple RabbitMQ (amqp wrapper) class for publishing and consuming messages","keywords":["ampq","rabbitmq","typescript"],"dependencies":{"@types/amqplib":"^0.5.5","amqplib":"^0.5.2","uuid":"^3.1.0","@types/uuid":"^3.4.3"},"pre-commit":{"silent":false,"run":["test:precommit","tslint"]},"main":"./amqp.js","types":"./amqp.d.ts","license":"MIT"}
{"name":"@coolgk/amqp","version":"1.1.2","author":"Daniel Gong <daniel.k.gong@gmail.com>","homepage":"https://www.npmjs.com/package/@coolgk/utils","bugs":{"url":"https://github.com/coolgk/utils/issues"},"repository":{"type":"git","url":"https://github.com/coolgk/utils.git"},"description":"a simple RabbitMQ (amqp wrapper) class for publishing and consuming messages","keywords":["ampq","rabbitmq","typescript"],"dependencies":{"@types/amqplib":"^0.5.5","amqplib":"^0.5.2","uuid":"^3.1.0","@types/uuid":"^3.4.3"},"pre-commit":{"silent":false,"run":["test:precommit","tslint"]},"main":"./amqp.js","types":"./amqp.d.ts","license":"MIT"}

@@ -8,39 +8,2 @@

a simple RabbitMQ (amqp wrapper) class for publishing and consuming messages
#### constructor(options)
- Parameters
- options
- {string} options.url - connection string e.g. amqp://localhost
- {string} [options.sslPem] - pem file path
- {string} [options.sslCa] - sslCa file path
- {string} [options.sslPass] - password
- Return Value
- void
#### closeConnection()
close the connection
- Return Value
- void
#### publish(message, callback, { route = '#', exchangeName = 'defaultExchange' } = {})
- Parameters
- {*} message - message any type that can be JSON.stringify'ed
- {function} [callback] - callback(message) for processing response from consumers
- {object} [options]
- {string} [options.route='#'] - route name
- {string} [options.exchangeName='defaultExchange'] - exchange name
- Return Value
- Promise<boolean>
#### consume(callback, { route = '#', queueName = 'defaultQueue', exchangeName = 'defaultExchange', exchangeType = 'topic', priority = 0, prefetch = 0 } = {})
- Parameters
- {function} callback - consumer(message) function should returns a promise
- {object} [options]
- {string} [options.route='#'] - exchange route
- {string} [options.queueName='defaultQueue'] - queue name for processing request
- {string} [options.exchangeName='defaultExchange'] - exchange name
- {string} [options.exchangeType='topic'] - exchange type
- {number} [options.priority=0] - priority, larger numbers indicate higher priority
- {number} [options.prefetch=0] - 1 or 0, if to process request one at a time
- Return Value
- Promise
## Examples

@@ -47,0 +10,0 @@ ```javascript

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