lib/rabbit-utils/assert-and-consume-app-queue.js
function assertAndConsumeAppQueue (app, queueName) {
  return co(function * () {
    const queue = app.queueMiddlewares[queueName]
    const queueOpts = queue.queueOpts
    const consumeOpts = queue.consumeOpts
    const handler = app.messageHandler(queueName)

    yield app.consumerChannel.assertQueue(queueName, queueOpts)

    return yield app.consumerChannel.consume(queueName, handler, consumeOpts)
  })
}
function assertAndConsumeAppQueue (app, queueName) {
  return co(function * () {
    const queue = app.queueMiddlewares[queueName]
    const queueOpts = queue.queueOpts
    const consumeOpts = queue.consumeOpts
    const handler = app.messageHandler(queueName)

    yield app.consumerChannel.assertQueue(queueName, queueOpts)

    return yield app.consumerChannel.consume(queueName, handler, consumeOpts)
  })
}
function assertAndConsumeAppQueue ( app , queueName ) { return co ( function * ( ) { const queue = app . queueMiddlewares [ queueName ] const queueOpts = queue . queueOpts const consumeOpts = queue . consumeOpts const handler = app . messageHandler ( queueName ) yield app . consumerChannel . assertQueue ( queueName , queueOpts ) return yield app . consumerChannel . consume ( queueName , handler , consumeOpts ) } ) }
Start consuming message from app's queues
@param  {Application} app coworkers instance
@param  {String} queueName app queue's name
@return {Promise} consume promise (yields consumer tag)
Start consuming message from app s queues