diff --git a/src/server/service/RatingServicePublish.js b/src/server/service/RatingServicePublish.js index fa0ac14..a99944f 100644 --- a/src/server/service/RatingServicePublish.js +++ b/src/server/service/RatingServicePublish.js @@ -95,10 +95,12 @@ module.exports = Trait( 'RatingServicePublish' ) { const queue = this._conf.queueName; - let connection = null; - this._amqp.connect( this._conf ) - .then( conn => connection = conn.createChannel() ) + .then( conn => + { + setTimeout( () => conn.close(), 10000 ); + return conn.createChannel(); + } ) .then( ch => { ch.assertQueue( queue, { durable: true } );