@coolgk/amqp
Advanced tools
Comparing version 1.1.1 to 1.1.2
/*! | ||
* @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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10448
101