HotMeshWorker: {
    callback: ((payload: StreamData) => Promise<StreamDataResponse>);
    connection?: ProviderConfig;
    connections?: {
        search?: ProviderConfig;
        store: ProviderConfig;
        stream: ProviderConfig;
        sub: ProviderConfig;
    };
    reclaimCount?: number;
    reclaimDelay?: number;
    redis?: ProviderConfig;
    topic: string;
}

Type declaration

  • callback: ((payload: StreamData) => Promise<StreamDataResponse>)

    The callback function to execute when a message is dequeued from the target stream

  • Optionalconnection?: ProviderConfig

    short-form format for the connection options for the store, stream, sub, and search clients

  • Optionalconnections?: {
        search?: ProviderConfig;
        store: ProviderConfig;
        stream: ProviderConfig;
        sub: ProviderConfig;
    }

    long-form format for the connection options for the store, stream, sub, and search clients

  • OptionalreclaimCount?: number

    the number of times to reclaim a stream before giving up and moving the message to a dead-letter queue or other error handling mechanism

  • OptionalreclaimDelay?: number

    the number of milliseconds to wait before reclaiming a stream; depending upon the provider this may be an explicit retry event, consuming a message from the stream and re-queueing it (dlq, etc), or it may be a configurable delay before the provider exposes the message to the consumer again. It is up to the provider, but expressed in milliseconds here.

  • Optionalredis?: ProviderConfig

    redis connection options; replaced with 'connection'

  • topic: string

    the topic that the worker subscribes to