Type Alias WorkerOpts<T>

WorkerOpts: {
    chunkSize?: number;
    delay?: number;
    getKey?: (x: T) => any;
    shouldDefer?: (x: T) => boolean;
}

Configuration options for Worker

Type Parameters

  • T

Type declaration

  • OptionalchunkSize?: number

    Maximum number of messages to process in one batch

  • Optionaldelay?: number

    Milliseconds to wait between processing batches

  • OptionalgetKey?: (x: T) => any

    Function to get key for message routing

  • OptionalshouldDefer?: (x: T) => boolean

    Function to determine if message processing should be deferred