BaseJobQueue class
Shared base of the three concrete queues, implementing everything that does not depend on which end of the queue you are.
Signature:
export declare abstract class BaseJobQueue<T, U> implements AnyJobQueue<T>
Implements: AnyJobQueue<T>
Remarks
Not usable on its own and not meant to be subclassed outside this package: it leaves BaseJobQueue.imq to be assigned by a subclass constructor, so a subclass that forgets to do so fails on first use. Reach for JobQueue, JobQueueWorker or JobQueuePublisher instead.
T is the concrete queue type, so inherited methods resolve to it rather than to this base; U is the job body type.
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
|
Stores the options and resolves the logger, leaving the broker connection to the subclass. |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
(Optional) The handler registered by | ||
|
|
IMessageQueue |
The underlying | |
|
|
ILogger |
Logger this queue reports through — JobQueueOptions.logger when one was given, | |
|
|
string |
Name of this queue, as given in JobQueueOptions.name. | |
|
|
The options this queue was constructed with, kept so that accessors like BaseJobQueue.name can read them back. Treat as read-only — nothing re-reads them after the broker connection is made, so changing one here has no effect on a running queue. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Destroys the job queue, closing the broker connection and releasing its resources. Not reversible — construct a new queue to carry on. | ||
|
Starts processing the job queue. | ||
|
Stops processing the job queue, leaving it able to start again. |
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.