Setu-TS
    Preparing search index...

    Interface IQueueDiagnosticsSource

    Read-only queue diagnostics source — the surface every QueuePlugin instance registers under CAPABILITIES.QUEUE_DIAGNOSTICS as a MULTI provider, so named queue instances stay independently observable. The DiagnosticsPlugin consumes every registered source to serve GET /v1/queues.

    Synchronous by contract: read returns already-captured, frozen data and never reserves, acknowledges, retries, dead-letters, enumerates or counts a job. A source whose queue plugin was not configured for observation answers disabled.

    const sources = ctx.services.getAll<IQueueDiagnosticsSource>(
    CAPABILITIES.QUEUE_DIAGNOSTICS,
    );
    const batch = sources[0].read(0, 128);

    0.8.0

    interface IQueueDiagnosticsSource {
        read(after: number, limit?: number): QueueDiagnosticsSourceBatch;
    }
    Index
    • Returns the source's attempts after after, oldest first, plus its latest depth observations.

      Parameters

      • after: number

        Source-local sequence cursor; 0 starts at the oldest retained attempt

      • Optionallimit: number

        Maximum attempts to return, 1–128 (default 128)

      Returns QueueDiagnosticsSourceBatch

      A deeply frozen QueueDiagnosticsSourceBatch

      When after is not a non-negative safe integer, when limit is not an integer from 1 to 128, or when after is beyond the source's current sequence — with a fixed message that never echoes the value