basalt / queue-bullmq/src / BullmqQueuePluginOptions
Interface: BullmqQueuePluginOptions
Defined in: queue-bullmq/src/index.ts:251
Everything queuePlugin accepts, minus driver (this plugin IS the driver choice), plus the BullMQ connection and its crash-safety hooks.
Extends
Omit<QueuePluginOptions,"driver">.BullmqDriverOptions
Properties
connection
> connection: string | ConnectionOptions
Defined in: queue-bullmq/src/index.ts:42
Redis URL (redis://... or rediss://...) or ioredis connection options.
Inherited from
BullmqDriverOptions.connection
jobs?
> optional jobs?: JobDefinition<unknown>[]
Defined in: queue/src/index.ts:61
Jobs known to this process (producer and/or worker).
Inherited from
onError?
> optional onError?: (error, info) => void
Defined in: queue-bullmq/src/index.ts:49
Infra errors from BullMQ's Worker/Queue emitters (e.g. Redis down). BullMQ emits these as EventEmitter 'error' events — unhandled, they CRASH the process. Default: logged via console.error with full context — observable, never fatal, never silent. (Same pattern as realtime's onBridgeError.)
Parameters
error
unknown
info
queue
string
source
"queue" | "worker"
Returns
void
Inherited from
onJobFailed?
> optional onJobFailed?: (info) => void
Defined in: queue-bullmq/src/index.ts:54
A job exhausted its retries (BullMQ 'failed'). Default: console.error — without this, exhausted jobs were only visible by polling queue stats.
Parameters
info
error
unknown
job
string
jobId?
string
queue
string
Returns
void
Inherited from
BullmqDriverOptions.onJobFailed
onUnsupported?
> optional onUnsupported?: UnsupportedPolicy
Defined in: queue/src/index.ts:86
What to do when a job uses an option the driver can't honor (e.g. a delayed job on a driver without delayed delivery). Default 'warn' — set 'throw' in production for a hard guarantee, 'ignore' for the old behavior.
Inherited from
QueuePluginOptions.onUnsupported
removeOnComplete?
> optional removeOnComplete?: JobRetention
Defined in: queue/src/index.ts:93
Default retention for completed jobs, for drivers whose backend keeps them (BullMQ/Redis today). true removes on finish, a number keeps that many, { age: '7d', count: 500 } caps both. Default: keep the last 1000. A job can override via defineJob.
Inherited from
QueuePluginOptions.removeOnComplete
removeOnFail?
> optional removeOnFail?: JobRetention
Defined in: queue/src/index.ts:98
Default retention for failed jobs. Default false (keep all, for inspection and retries) — set e.g. { age: '14d' } so failures don't grow unbounded.
Inherited from
QueuePluginOptions.removeOnFail
signingKey?
> optional signingKey?: QueueSigningKey | readonly QueueSigningKey[]
Defined in: queue/src/index.ts:104
HMAC key(s) that sign every job envelope; the worker rejects unsigned or tampered jobs. Without it, anyone who can write to the broker can enqueue jobs and choose their tenant/user. See QueueManagerOptions.signingKey.
Inherited from
validateTenantId?
> optional validateTenantId?: (id) => boolean
Defined in: queue/src/index.ts:109
Tenant-id grammar accepted from a job's context. Default: tenancy's default grammar. Pass the same function you gave tenancyPlugin.
Parameters
id
string
Returns
boolean
Inherited from
QueuePluginOptions.validateTenantId
workers?
> optional workers?: object[]
Defined in: queue/src/index.ts:80
Queues to start workers for in this process at boot.
concurrency?
> optional concurrency?: number
queue
> queue: string