@numaproj/numaflow-js - v0.0.0-alpha.4
    Preparing search index...

    Interface Sourcer

    Interface that must be implemented for custom sources.

    Provides methods for reading messages, acknowledging them, and querying source status.

    interface Sourcer {
        ack: (offsets: Offset[]) => Promise<void>;
        nack: (offsets: Offset[]) => Promise<void>;
        partitions: () => Promise<number[] | null>;
        pending: () => Promise<number | null>;
        read: (request: ReadRequest) => AsyncIterable<source.Message>;
    }
    Index

    Properties

    ack: (offsets: Offset[]) => Promise<void>

    Acknowledge that messages have been successfully processed.

    Type Declaration

    nack: (offsets: Offset[]) => Promise<void>

    Negative acknowledge messages that failed processing.

    Type Declaration

    partitions: () => Promise<number[] | null>

    Get the list of available partitions.

    Type Declaration

      • (): Promise<number[] | null>
      • Returns Promise<number[] | null>

        Array of partition IDs, or null if not applicable

    pending: () => Promise<number | null>

    Get the count of pending messages.

    Type Declaration

      • (): Promise<number | null>
      • Returns Promise<number | null>

        Number of pending messages, or null if unknown

    Read messages from the source.

    Type Declaration