ReadonlyisWhether this client is connected to a Redis Cluster.
Client configuration options (shape is adapter-specific).
Current connection status.
Adapters must expose at least the values 'ready', 'wait', and
'end' so that RedisConnection.waitUntilReady works correctly.
Block until an element is available in the given sorted set, or the timeout expires.
The return shape mirrors ioredis' native bzpopmin:
[key, member, score] on success, or null on timeout. Adapters for
other clients (node-redis, bun) MUST convert their native return value
to this tuple form. This avoids mutating the shape of bzpopmin on
shared ioredis instances, which would be a breaking change for code
that uses the same client outside of BullMQ.
Register a Lua script as a named command so it can later be invoked via runCommand.
Command name that will be callable via runCommand.
Script definition.
numberOfKeys – number of KEYS[] arguments the script expects.lua – Lua source code.readOnly – (optional) hint that the script only reads data;
some adapters (e.g. ioredis) use this to route the
call to a replica in read-only mode.Optionalreconnect: booleanSET one or more hash fields from a field→value map.
OptionalnodesReturn connections for each cluster node (only when isCluster).
Optionalevent: string | symbolExecute a previously registered Lua script command by name.
The command name passed to defineCommand.
Arguments forwarded to the script (KEYS first, then ARGV).
A Promise<any> whose resolved value matches the return value of
the Lua script. BullMQ scripts return integers, strings, or arrays of
strings/integers. Callers in Scripts.execCommand cast the result
to the expected concrete type after the call.
Optionaloptions: { EX?: number; PX?: number }Append an entry to a stream.
Stream key
Entry ID (typically '*' for auto-generated)
Field-value pairs for the stream entry
Optionaloptions: { approximate?: boolean; MAXLEN?: number }Optional MAXLEN trimming parameters
Read from one or more streams.
Array of stream/id pairs to read from
Optionaloptions: { BLOCK?: number; COUNT?: number }Optional BLOCK timeout and COUNT
Trim a stream.
Stream key
Trim strategy (e.g. 'MAXLEN')
Maximum stream length
Optionaloptions: { approximate?: boolean }Optional approximate trimming
Redis client interface for BullMQ.
Abstracts the underlying Redis client library (ioredis, node-redis, Bun built-in Redis, etc.) while keeping Redis semantics. Only the Redis commands that BullMQ actually uses are declared here.
Method signatures use structured options objects instead of ioredis-style varargs so that every adapter (ioredis, node-redis, Bun, …) can map the call to its native API without parsing positional string tokens.
The reference implementation for ioredis lives in
src/classes/ioredis-client.ts.