Skip to main content
All signatures on this page are verified against the current @exulu/backend source. For configuration options, see Configuration.

Singleton import

ExuluQueues is a singleton instance of the internal ExuluQueues class. There is no constructor to call.

Methods

register()

Registers a queue and returns a { use } handle. Synchronous — does not connect to Redis.
name
string
required
Queue name. Must be unique in the application. Used as the BullMQ queue name and as the key in ExuluQueues.list. Also populates the GraphQL QueueEnum at boot.
concurrency.worker
number
required
Per-process worker concurrency. Passed to BullMQ Worker({ concurrency }).
concurrency.queue
number
required
Global concurrency cap across all workers, set via queue.setGlobalConcurrency(). BullMQ enforces this in Redis.
ratelimit
number
default:"1"
Maximum jobs per second per worker process. Stored here and applied as a BullMQ worker rate limiter.
timeoutInSeconds
number
default:"180"
Maximum job execution time. Workers use this as their lock duration.
use
() => Promise<ExuluQueueConfig>
Calling .use() connects to Redis (lazily, on first call) and returns the live ExuluQueueConfig. Subsequent calls for the same name return the cached queue instance.
register() throws immediately if EXULU_ENTERPRISE_LICENSE is not set or does not include the queues entitlement.

queue()

Retrieves the live queue config for a previously initialized queue (one where .use() has been called).
name
string
required
Queue name as passed to register().
Returns undefined if the queue has never been initialized (.use() never awaited). Returns the live entry from ExuluQueues.queues if found.

Properties

list

A Map keyed by queue name, populated synchronously by every register() call regardless of whether the queue has connected to Redis. Use this to enumerate all registered queues, for example when building queue selection UIs or verifying that expected queues are registered.

queues

Array of initialized queue configs — entries appear here only after .use() has been awaited for each queue. Used internally by IMP to create workers at app.create() time and to drive the GraphQL job inspection resolvers.

ExuluQueueConfig

The object returned by .use():

queue — BullMQ Queue API

The queue property is a fully functional BullMQ Queue. Commonly used methods:

GraphQL integration

Every queue name registered before app.create() is injected into the QueueEnum in the GraphQL schema:
This enum is used by the platform’s job management queries and mutations:
Queues registered after app.create() are not reflected in the schema for the current process lifetime — register all queues before calling app.create().

Next steps

Configuration

register() parameters, rate-limit sizing, and configuration examples.

ExuluContext

Pass ExuluQueueConfig to an embedder, source, or processor.