BullMQ.Backends.Redis (BullMQ v2.0.2)
View SourceRedis implementation of the BullMQ.Backend behaviour.
This adapter is the Elixir port of the Node.js RedisQueueBackend. It is an
immutable struct carrying the queue identity (key context) and a
reference to the connection process(es) it uses:
connection— a pooledBullMQ.RedisConnection(aSupervisor+NimblePool). Commands run in the caller process via a pool checkout, so many operations can run concurrently without a per-backend process.blocking_conn— an optional dedicated blocking connection (aRedixpid) used for the worker'sBZPOPMINand the event stream'sXREAD, which must not stall pooled commands.
The adapter delegates the high-level operations to the existing
BullMQ.Scripts (Lua) and BullMQ.RedisConnection (raw command) modules, so
it is a thin translation layer: Backend.<fn>(backend, args) becomes
Scripts.<fn>(backend.connection, backend.context, args).
Summary
Functions
Filters the job option keys that are encoded into the add scripts. Public so callers building bulk entries can reuse the same encoding.
The minimum meaningful blocking timeout (seconds).
Builds a Redis backend for name.
Types
Functions
Filters the job option keys that are encoded into the add scripts. Public so callers building bulk entries can reuse the same encoding.
The minimum meaningful blocking timeout (seconds).
Builds a Redis backend for name.
Options
:connection(required) — aBullMQ.RedisConnectionreference.:prefix— key prefix (default"bull").:blocking_conn— an optional dedicated blocking connection pid.:client_name— a client name set on the dedicated blocking connection when it is established (used for worker discovery viaCLIENT LIST).:owns_connection— whetherclose/2should stop the connection (defaulttrue).