stitchng / adonis-queue

An addon/plugin package to provide driver-based job queueing services in AdonisJS 4.0+
MIT License
34 stars 9 forks source link

E_INVALID_QUEUE_DRIVER: rabbitmq is not a valid queue driver #13

Open koficypher opened 3 years ago

koficypher commented 3 years ago

Package version

0.1.10

Node.js and npm version

Node V - 14.15.4 Npm - 6.14.10

Sample Code (to reproduce the issue)

 'use strict'

const Env = use('Env')

module.exports = {
  driver: 'rabbitmq', // :> 'redis' , 'rabbitmq'
  redis: {
    url: '_',
    high: {
      prefix: 'mainh-',
      stallInterval: 5000,
      nearTermWindow: 1200000,
      delayedDebounce: 1000,
      redis: {
        host: Env.get('REDIS_HOST', '127.0.0.1'),
        port: Env.get('REDIS_PORT', '6379'),
        db: 1,
        options: { attempt: 20 },
        retry_strategy (options) {
          return Math.min(options.attempt * 100, 3000)
        }
      },
      isWorker: true,
      getEvents: true,
      sendEvents: true,
      storeJobs: true,
      ensureScripts: true,
      maxConcurrencyJobs: 4,
      activateDelayedJobs: true,
      removeOnSuccess: true,
      removeOnFailure: false,
      redisScanCount: 100
    },
    low: {
      prefix: 'mainl-',
      stallInterval: 8000,
      nearTermWindow: 1200000,
      delayedDebounce: 2000,
      redis: {
        host: Env.get('REDIS_HOST', '127.0.0.1'),
        port: Env.get('REDIS_PORT', '6379'),
        db: 2,
        options: { attempt: 20 },
        retry_strategy (options) {
          return Math.min(options.attempt * 100, 3000)
        }
      },
      isWorker: true,
      getEvents: true,
      sendEvents: true,
      storeJobs: true,
      ensureScripts: true,
      maxConcurrencyJobs: 4,
      activateDelayedJobs: true,
      removeOnSuccess: true,
      removeOnFailure: false,
      redisScanCount: 150
    }
  },
  rabbitmq: {
    url: Env.get('RABBIT_MQ_URL', 'amqp://localhost'),
    high: {
      prefetch: 1, // default prefetch from queue
      replyPattern: false, // if reply pattern is enabled an exclusive queue is created
      scheduledPublish: false,
      prefix: 'mainh-', // prefix all queues with an application name
      socketOptions: {} // socketOptions will be passed as a second param to amqp.connect and from ther to the socket library (net or tls)
    },
    low: {
      prefetch: 1, // default prefetch from queue
      replyPattern: false, // if reply pattern is enabled an exclusive queue is created
      scheduledPublish: false,
      prefix: 'mainl-', // prefix all queues with an application name
      socketOptions: {} // socketOptions will be passed as a second param to amqp.connect and from ther to the socket library (net or tls)
    }
  }
}

My issue is that i keep getting this error in my console when i start my application. Followed up the instructions to the letter and still getting this error. Can you please help ?