Skip to content

basalt / queue-rabbitmq/src / rabbitmqQueuePlugin

Function: rabbitmqQueuePlugin() ​

> rabbitmqQueuePlugin(options): BasaltPlugin<unknown>

Defined in: queue-rabbitmq/src/index.ts:400

The RabbitMQ-backed queue plugin — one line to put an app's jobs on RabbitMQ:

ts
rabbitmqQueuePlugin({ url: process.env.AMQP_URL!, jobs: [SendWelcome], workers: [{ queue: 'welcome' }] })

Every backend ships a plugin of this shape (bullmqQueuePlugin, sqsQueuePlugin, kafkaQueuePlugin), so no backend is privileged in the core's API and @basaltkit/queue stays a pure contract. Use queuePlugin({ driver }) directly for a driver you wrote yourself.

Building the driver here, when the app is DEFINED, is safe: the constructor only reads defaults, and every connection is opened lazily on first use.

Parameters ​

options ​

RabbitmqQueuePluginOptions

Returns ​

BasaltPlugin<unknown>

Released under the MIT License.