Interface FirehoseOptions<Type, Data, CustomHeaders, CustomOptions>

interface FirehoseOptions<
    Type extends string = string,
    Data = any,
    CustomHeaders extends Record<string, any> = AnyHeaders,
    CustomOptions extends Record<string, any> = AnyOptions,
> {
    atLeastOne?: boolean;
    bufferSize?: number;
    logger?: LoggerInstance;
    maxInactivityTime?: number;
    postConsumeOptions?: PostConsumeOptions;
    retryOptions?: RetryOptions;
    sinks: Plugs.Sink.Any<Type, Data, CustomHeaders, CustomOptions>[];
    sources: Plugs.Source.Any<Type, Data, CustomHeaders, CustomOptions>[];
    strategies?: {
        [type: string]: Jobs.Strategy<Type, Data, CustomHeaders, CustomOptions>[];
    };
}

Type Parameters

  • Type extends string = string
  • Data = any
  • CustomHeaders extends Record<string, any> = AnyHeaders
  • CustomOptions extends Record<string, any> = AnyOptions

Properties

atLeastOne?: boolean

Define the number of sinks that must confirm a job, default options is all of them

bufferSize?: number

Buffer sizes

Logger instance for deep debugging tasks

maxInactivityTime?: number

Maximum time of inactivity before the firehose notify that is hold

postConsumeOptions?: PostConsumeOptions

Post consume operation options

retryOptions?: RetryOptions

Retry options for sink/source operations

Firehose sinks

Firehose sources

strategies?: {
    [type: string]: Jobs.Strategy<Type, Data, CustomHeaders, CustomOptions>[];
}

Firehose transformation strategies per job type