basalt / queue-rabbitmq/src / RabbitmqDriverOptions
Interface: RabbitmqDriverOptions
Defined in: queue-rabbitmq/src/index.ts:83
Extended by
Properties
connect?
> optional connect?: AmqpConnect
Defined in: queue-rabbitmq/src/index.ts:109
Injectable connector — defaults to amqplib. Tests pass a fake.
drainTimeoutMs?
> optional drainTimeoutMs?: number
Defined in: queue-rabbitmq/src/index.ts:99
On close(), how long to wait for in-flight job handlers to finish before tearing the channel down anyway. Default 10_000 ms. Unfinished jobs stay unacked, so the broker redelivers them.
maxPriority?
> optional maxPriority?: number
Defined in: queue-rabbitmq/src/index.ts:93
Max priority level for priority queues (x-max-priority). Default 10.
onError?
> optional onError?: (error, info) => void
Defined in: queue-rabbitmq/src/index.ts:91
Infra errors from the amqplib connection/channel emitters (broker gone, channel torn down). amqplib surfaces these as EventEmitter 'error' events — unhandled, they CRASH the process. Default: console.error with context.
Parameters
error
unknown
info
source
"connection" | "channel"
Returns
void
reconnectDelayMs?
> optional reconnectDelayMs?: number
Defined in: queue-rabbitmq/src/index.ts:107
After the connection or channel closes unexpectedly (broker restart, network cut, a channel-level protocol error), how long to wait before reconnecting — doubled on each consecutive failure, capped at 30s. The next add() reconnects on demand; workers are re-subscribed by the reconnect loop. Default 1000 ms.
url
> url: string
Defined in: queue-rabbitmq/src/index.ts:85
AMQP URL, e.g. amqp://user:pass@host:5672.