@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.
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.Per-process worker concurrency. Passed to BullMQ
Worker({ concurrency }).Global concurrency cap across all workers, set via
queue.setGlobalConcurrency(). BullMQ enforces this in Redis.Maximum jobs per second per worker process. Stored here and applied as a BullMQ worker rate limiter.
Maximum job execution time. Workers use this as their lock duration.
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.queue()
Retrieves the live queue config for a previously initialized queue (one where.use() has been called).
Queue name as passed to
register().undefined if the queue has never been initialized (.use() never awaited). Returns the live entry from ExuluQueues.queues if found.
Properties
list
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
.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
Thequeue property is a fully functional BullMQ Queue. Commonly used methods:
GraphQL integration
Every queue name registered beforeapp.create() is injected into the QueueEnum in the GraphQL schema:
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.