redis-smq
Version:
A simple high-performance Redis message queue for Node.js.
44 lines • 2.35 kB
TypeScript
import { ICallback, ILogger, IRedisClient, Runnable, Timer } from 'redis-smq-common';
import { TConsumerDequeueMessageEvent } from '../../../../common/index.js';
import { RedisClient } from '../../../../common/redis-client/redis-client.js';
import { EventBus } from '../../../event-bus/index.js';
import { EQueueType, IQueueParsedParams, IQueueRateLimit } from '../../../queue/index.js';
import { Consumer } from '../../consumer/consumer.js';
export declare class DequeueMessage extends Runnable<TConsumerDequeueMessageEvent> {
protected redisClient: RedisClient;
protected queue: IQueueParsedParams;
protected consumerId: string;
protected timer: Timer;
protected keyQueues: string;
protected keyQueueConsumers: string;
protected keyConsumerQueues: string;
protected keyQueueProcessingQueues: string;
protected keyQueueProcessing: string;
protected keyQueuePending: string;
protected keyQueuePriorityPending: string;
protected logger: ILogger;
protected blockUntilMessageReceived: boolean;
protected autoCloseRedisConnection: boolean;
protected eventBus: EventBus;
protected queueRateLimit: IQueueRateLimit | null;
protected queueType: EQueueType | null;
protected idleThreshold: number;
protected idleTrigger: number;
constructor(redisClient: RedisClient, queue: IQueueParsedParams, consumer: Consumer, logger: ILogger, eventBus: EventBus | null, blockUntilMessageReceived?: boolean, autoCloseRedisConnection?: boolean);
protected getLogger(): ILogger;
protected handleError(err: Error): void;
protected goingUp(): ((cb: ICallback<void>) => void)[];
protected goingDown(): ((cb: ICallback<void>) => void)[];
protected updateIdle(): void;
protected resetIdle(): void;
protected isIdle(): boolean;
protected isPriorityQueuingEnabled(): boolean;
protected handleMessage: ICallback<string | null>;
protected dequeueWithRateLimit: (redisClient: IRedisClient) => boolean;
protected dequeueWithRateLimitExec: (redisClient: IRedisClient) => void;
protected dequeueWithPriority: (redisClient: IRedisClient) => boolean;
protected dequeueAndBlock: (redisClient: IRedisClient) => boolean;
protected dequeueAndReturn: (redisClient: IRedisClient) => void;
dequeue(): void;
}
//# sourceMappingURL=dequeue-message.d.ts.map