UNPKG

redis-smq

Version:

A simple high-performance Redis message queue for Node.js.

24 lines (23 loc) 1.14 kB
import { EQueueType, TQueueParams, TQueueRateLimit } from '../../../../types'; import { redisKeys } from '../../../common/redis-keys/redis-keys'; import { RedisClient, Ticker } from 'redis-smq-common'; import { MessageHandler } from './message-handler'; import { ICallback } from 'redis-smq-common/dist/types'; export declare class DequeueMessage { protected redisClient: RedisClient; protected queue: TQueueParams; protected consumerId: string; protected redisKeys: ReturnType<typeof redisKeys['getQueueConsumerKeys']>; protected queueRateLimit: TQueueRateLimit | null; protected ticker: Ticker; protected messageHandler: MessageHandler; protected queueType: EQueueType | null; constructor(messageHandler: MessageHandler, redisClient: RedisClient); protected dequeueMessageWithPriority(cb: ICallback<string | null>): void; protected waitForMessage(cb: ICallback<string | null>): void; protected dequeueMessage(cb: ICallback<string | null>): void; dequeue(): void; protected isPriorityQueuingEnabled(): boolean; run(cb: ICallback<void>): void; quit(cb: ICallback<void>): void; }