@emartech/rabbitmq-client
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -39,3 +39,3 @@ { | ||
"@emartech/object-batcher-js": "^1.2.0", | ||
"amqplib": "^0.5.1", | ||
"amqplib": "^0.5.2", | ||
"dotenv": "^4.0.0", | ||
@@ -45,3 +45,3 @@ "lodash": "^4.17.4", | ||
}, | ||
"version": "2.2.0" | ||
"version": "2.3.0" | ||
} |
@@ -17,2 +17,3 @@ 'use strict'; | ||
this._amqpConfig = amqpConfig; | ||
this._queueOptions = configuration.queueOptions || {}; | ||
this._prefetchCount = configuration.prefetchCount || parseInt(process.env.PREFETCH_COUNT, 10) || 1024; | ||
@@ -63,3 +64,3 @@ this._objectBatcher = new ObjectBatcher(this._handleCollectedMessages.bind(this), { | ||
if (!this._rabbitMqChannel) { | ||
this._rabbitMq = await RabbitMq.create(this._amqpConfig, this._channel, this._connectionType); | ||
this._rabbitMq = await RabbitMq.create(this._amqpConfig, this._channel, this._connectionType, this._queueOptions); | ||
this._rabbitMqChannel = this._rabbitMq.getChannel(); | ||
@@ -66,0 +67,0 @@ await this._rabbitMqChannel.prefetch(this._prefetchCount); |
@@ -11,2 +11,3 @@ 'use strict'; | ||
this._channel = configuration.channel; | ||
this._connectionType = configuration.connectionType || 'default'; | ||
this._onMessage = configuration.onMessage; | ||
@@ -17,2 +18,3 @@ this._retryTime = configuration.retryTime || 60000; | ||
this._autoNackTime = configuration.autoNackTime || false; | ||
this._queueOptions = configuration.queueOptions || {}; | ||
this._amqpConfig = amqpConfig; | ||
@@ -26,3 +28,3 @@ } | ||
try { | ||
const rabbitMq = await RabbitMq.create(this._amqpConfig, this._channel); | ||
const rabbitMq = await RabbitMq.create(this._amqpConfig, this._channel, this._connectionType, this._queueOptions); | ||
const channel = rabbitMq.getChannel(); | ||
@@ -29,0 +31,0 @@ await channel.prefetch(this._prefetchCount); |
Sorry, the diff of this file is not supported yet
31589
801
14
Updatedamqplib@^0.5.2