OptionalbackendFactory: BackendFactoryThe datastore backend the queue operates through.
ReadonlynameThe name of the queue.
Options for the queue.
ReadonlyqualifiedCloses the connection and returns a promise that resolves when the connection is closed.
Force disconnects a connection.
Emits an event. Normally used by subclasses to emit events.
The emitted event.
The arguments to pass to the event listeners.
True if the event had listeners, false otherwise.
Returns the datastore backend that powers this instance.
The backend owns its connection(s) and exposes every datastore-agnostic operation through IQueueBackend. Datastore-specific escape hatches (e.g. the raw Redis client) live on the concrete backend implementation, and are exposed here when the class is parameterized on that concrete backend type (the default for the built-in, Redis-backed classes).
Checks if a given id corresponds to a registered job scheduler.
This is used to disambiguate between new job scheduler ids (which may contain any number of colon segments) and legacy repeatable job keys (which always contain 5+ colon segments). Relying purely on segment count is not safe because a user-provided jobSchedulerId may itself contain 5+ colon segments, which would otherwise be misclassified as a legacy repeatable key.
We cannot use ZSCORE on the shared repeat sorted set because legacy
repeatable jobs are stored in the same sorted set and would be reported
as schedulers. Instead, we probe the per-id metadata hash (repeat:<id>)
for the ic (iteration count) field, which is written exclusively by
storeJobScheduler and is never set by the legacy addRepeatableJob
flow.
Wraps the code with telemetry and provides a span for configuration.
kind of the span: Producer, Consumer, Internal
operation name (such as add, process, etc)
destination name (normally the queue name)
code to wrap with telemetry
OptionalsrcPropagationMetadata: string
The source propagation metadata for telemetry context.
The result of the callback function.
Resolves once the underlying backend (and its connection) is ready.
Base class for all classes that need to interact with queues. This class is normally not used directly, but extended by the other classes.