redis-smq
Version:
A high-performance, reliable, and scalable message queue for Node.js.
25 lines • 2.05 kB
TypeScript
import { createLogger, ICallback } from 'redis-smq-common';
import { IQueueParams } from '../../queue-manager/index.js';
import { EExchangeQueuePolicy, EExchangeType, IExchangeParams } from '../types/index.js';
export declare class ExchangeDirect {
protected readonly type = EExchangeType.DIRECT;
protected readonly logger: ReturnType<typeof createLogger>;
constructor();
getRoutingKeys(exchange: string | IExchangeParams): Promise<string[]>;
getRoutingKeys(exchange: string | IExchangeParams, cb: ICallback<string[]>): void;
getRoutingKeyBoundQueues(exchange: string | IExchangeParams, routingKey: string): Promise<IQueueParams[]>;
getRoutingKeyBoundQueues(exchange: string | IExchangeParams, routingKey: string, cb: ICallback<IQueueParams[]>): void;
matchQueues(exchange: string | IExchangeParams, routingKey: string): Promise<IQueueParams[]>;
matchQueues(exchange: string | IExchangeParams, routingKey: string, cb: ICallback<IQueueParams[]>): void;
create(exchange: string | IExchangeParams, queuePolicy: EExchangeQueuePolicy): Promise<void>;
create(exchange: string | IExchangeParams, queuePolicy: EExchangeQueuePolicy, cb: ICallback): void;
bindQueue(queue: string | IQueueParams, exchange: string | IExchangeParams, routingKey: string): Promise<void>;
bindQueue(queue: string | IQueueParams, exchange: string | IExchangeParams, routingKey: string, cb: ICallback): void;
unbindQueue(queue: string | IQueueParams, exchange: string | IExchangeParams, routingKey: string): Promise<void>;
unbindQueue(queue: string | IQueueParams, exchange: string | IExchangeParams, routingKey: string, cb: ICallback): void;
delete(exchange: string | IExchangeParams): Promise<void>;
delete(exchange: string | IExchangeParams, cb: ICallback): void;
getBindings(exchange: string | IExchangeParams): Promise<Record<string, IQueueParams[]>>;
getBindings(exchange: string | IExchangeParams, cb: ICallback<Record<string, IQueueParams[]>>): void;
}
//# sourceMappingURL=exchange-direct.d.ts.map