/// import { ILogger } from '../logger'; import { StreamService } from '../stream'; import { RouterConfig, StreamData, StreamDataResponse, StreamRole } from '../../types/stream'; import { DuressLevel } from '../../types/quorum'; import { ProviderClient, ProviderTransaction } from '../../types/provider'; import { DuressSnapshot } from './duress'; declare class Router> { appId: string; guid: string; role: StreamRole; topic: string | undefined; stream: S; reclaimDelay: number; reclaimCount: number; logger: ILogger; readonly: boolean; retry: import('../../types/stream').RetryPolicy | undefined; errorCount: number; counts: { [key: string]: number; }; hasReachedMaxBackoff: boolean | undefined; currentTimerId: NodeJS.Timeout | null; sleepPromiseResolve: (() => void) | null; innerPromiseResolve: (() => void) | null; isSleeping: boolean; sleepTimout: NodeJS.Timeout | null; private isUsingNotifications; private throttleManager; private errorHandler; private lifecycleManager; private consumptionManager; private duressManager?; private _pendingDuressSnapshot?; constructor(config: RouterConfig, stream: S, logger: ILogger); get throttle(): number; get shouldConsume(): boolean; set shouldConsume(value: boolean); private resetThrottleState; createGroup(stream: string, group: string): Promise; publishMessage(topic: string, streamData: StreamData | StreamDataResponse, transaction?: ProviderTransaction): Promise; customSleep(): Promise; consumeMessages(stream: string, group: string, consumer: string, callback: (streamData: StreamData) => Promise): Promise; isStreamMessage(result: any): boolean; isPaused(): boolean; isStopped(group: string, consumer: string, stream: string): boolean; consumeOne(stream: string, group: string, id: string, input: StreamData, callback: (streamData: StreamData) => Promise): Promise; execStreamLeg(input: StreamData, stream: string, id: string, callback: (streamData: StreamData) => Promise): Promise; ackAndDelete(stream: string, group: string, id: string): Promise; publishResponse(input: StreamData, output: StreamDataResponse | void): Promise; shouldRetry(input: StreamData, output: StreamDataResponse): [boolean, number]; structureUnhandledError(input: StreamData, err: Error): StreamDataResponse; structureUnacknowledgedError(input: StreamData): StreamDataResponse; structureError(input: StreamData, output: StreamDataResponse): StreamDataResponse; setDuressCallback(callback: (snapshot: DuressSnapshot) => void): void; applyRemoteDuress(throttleMs: number, level: DuressLevel): void; getDuressSnapshot(): DuressSnapshot | undefined; static stopConsuming(): Promise; stopConsuming(): Promise; cancelThrottle(): void; setThrottle(delayInMillis: number): void; static get instances(): Set>; } export { Router };