createBullMQTaskQueue
Purpose and behavior
Section titled “Purpose and behavior”Open a TaskQueue on standalone Redis through BullMQ 5; import it from @elie-laloum/outpost/queues/bullmq and install bullmq separately. Rejects a server whose maxmemory-policy is not noeviction, without changing its configuration. The queue owns its Redis connections: stop the workers, then await close().
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”optionsRequiredBullMQTaskQueueOptionsRedis connection settings and the stable namespace shared by producers and workers.options.nameRequiredstringLogical queue name shared by all clients; hashed internally, so colons and Unicode are supported. Different names isolate job identities.options.connectionRequiredRedisOptionsRedisOptions for standalone Redis (host, port, db, username, password, tls), not a live client. Connect and command timeouts default to 10000; keyPrefix is rejected, use prefix instead.options.prefixOptionalstring | undefinedRedis key prefix, default outpost. Keep it stable across restarts and identical on every client; use a dedicated namespace without external BullMQ consumers or cleanup.options.stalledIntervalMsOptionalnumber | undefinedPositive interval in milliseconds between BullMQ stalled-job checks, default 1000. Reclaiming an expired lease may require two checks; this is separate from leaseMs and pollMs.options.onErrorOptional((error: Error) => void) | undefinedSynchronous observer for connection, stalled-check and BullMQ finalization errors; its exceptions are ignored. Queue operations still reject on their own failures.