AIRI Server API - v0.10.2
    Preparing search index...

    Function selectConsumerPeerId

    • Selects a concrete consumer peer for consumer-style delivery modes.

      Use when:

      • Existing server-runtime callers need the package-root consumer selector
      • Sticky and round-robin state should remain stored in the original root API shape

      Expects:

      • Candidates already describe authenticated and health state

      Returns:

      • The selected peer id, or undefined when no eligible consumer is available

      Parameters

      • options: {
            eventType: string;
            fromPeerId: string;
            delivery?: DeliveryConfig;
            candidates: ServerWsConsumerSelectionCandidate[];
            roundRobinCursor?: Map<string, number>;
            stickyAssignments?: Map<string, string>;
        }

      Returns string | undefined