basalt / queue/src / QueuePluginOptions
Interface: QueuePluginOptions
Defined in: queue/src/index.ts:59
Properties
driver?
> optional driver?: QueueDriver
Defined in: queue/src/index.ts:78
The backend. Omit it and jobs run on the inline SyncQueueDriver, which is right for dev and tests and wrong for production.
Every real backend ships its own plugin wrapping this one, so you rarely write driver by hand:
import { bullmqQueuePlugin } from '@basaltkit/queue-bullmq'
bullmqQueuePlugin({ connection: process.env.REDIS_URL!, jobs })@basaltkit/queue-rabbitmq, @basaltkit/queue-sqs and @basaltkit/queue-kafka expose the same shape. Pass driver directly for a driver of your own.
jobs?
> optional jobs?: JobDefinition<unknown>[]
Defined in: queue/src/index.ts:61
Jobs known to this process (producer and/or worker).
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.
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.
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.
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.
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
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