Changelog - 2026-09-06
Queue helper extension seams
New FeatureIn one line. BullMQHelper takes queueOptions/workerOptions; KafkaConsumerHelper adds onStreamError/onReconnectError and turns fully protected.
typescript
import { BullMQHelper } from '@venizia/ignis-helpers/bullmq';
new BullMQHelper({
queueName: 'mail',
identifier: 'mail-worker',
role: 'worker',
redisConnection,
workerOptions: { autorun: false },
});The problem it solves
Two consumers each forked a whole framework class to reach one missing seam. One needed extra BullMQ options passed through to the underlying Queue and Worker.
The other needed to react to a Kafka stream error separately from a per-message error. It also needed to extend a helper whose lifecycle methods were private.
What changed
| Symbol | Change | Package |
|---|---|---|
IBullMQOptions.queueOptions / .workerOptions | New; typed from bullmq's QueueOptions/WorkerOptions, minus the fields the helper owns | helpers |
BullMQHelper.queueOptionsFor() / .workerOptionsFor() | New protected methods; merge the framework defaults, then the option, then the owned fields (connection, concurrency, lockDuration) | helpers |
BullMQHelper.isClusterClient() | New protected method; duck-types a Redis Cluster client (instanceof Cluster, isCluster, or a nodes() method), so a duplicated or cross-copy client still gets the {queueName} hash tag | helpers |
IKafkaConsumerOptions.onStreamError / .onReconnectError | New callbacks; each falls back to onMessageError when unset | helpers |
KafkaConsumerHelper | Every member is protected, not private | helpers |
onMessageErrorkeeps its per-message role. A consumer that sets onlyonMessageErrorsees no behavior change.protectedhere is an extension seam, not a stable contract between minor versions.
Who is affected
- Consumers that forked
BullMQHelperorKafkaConsumerHelperto reach these seams. Extend the class, or pass the new options, and delete the fork. - Everyone else. No action needed.