redis-smq
Version:
A simple high-performance Redis message queue for Node.js.
29 lines • 1.82 kB
TypeScript
import { ICallback, ILogger, IRedisClient, Runnable, TUnaryFunction } from 'redis-smq-common';
import { TProducerEvent } from '../../common/index.js';
import { RedisClient } from '../../common/redis-client/redis-client.js';
import { EventBus } from '../event-bus/index.js';
import { ProducibleMessage } from '../message/index.js';
import { MessageEnvelope } from '../message/message-envelope.js';
import { IQueueParams } from '../queue/index.js';
import { QueueConsumerGroupsCache } from './queue-consumer-groups-cache.js';
export declare class Producer extends Runnable<TProducerEvent> {
protected logger: ILogger;
protected redisClient: RedisClient;
protected eventBus: EventBus;
protected queueConsumerGroupsHandler: QueueConsumerGroupsCache | null;
constructor();
protected getLogger(): ILogger;
protected initQueueConsumerGroupsHandler: (cb: ICallback<void>) => void;
protected shutDownQueueConsumerGroupsHandler: (cb: ICallback<void>) => void;
protected initRedisClient: (cb: ICallback<void>) => void;
protected goingUp(): TUnaryFunction<ICallback<void>>[];
protected up(cb: ICallback<boolean>): void;
protected goingDown(): TUnaryFunction<ICallback<void>>[];
protected down(cb: ICallback<boolean>): void;
protected getQueueConsumerGroupsHandler(): QueueConsumerGroupsCache;
protected enqueue(redisClient: IRedisClient, message: MessageEnvelope, cb: ICallback<void>): void;
protected produceMessageItem(redisClient: IRedisClient, message: MessageEnvelope, queue: IQueueParams, cb: ICallback<string>): void;
protected produceMessage(redisClient: IRedisClient, message: ProducibleMessage, queue: IQueueParams, cb: ICallback<string[]>): void;
produce(msg: ProducibleMessage, cb: ICallback<string[]>): void;
}
//# sourceMappingURL=producer.d.ts.map