1 |
|
2 | import { Logger } from '@nestjs/common/services/logger.service';
|
3 | import { EventEmitter } from 'events';
|
4 | import { Observable } from 'rxjs';
|
5 | import { RmqUrl } from '../external/rmq-url.interface';
|
6 | import { ReadPacket, RmqOptions, WritePacket } from '../interfaces';
|
7 | import { ClientProxy } from './client-proxy';
|
8 | export declare class ClientRMQ extends ClientProxy {
|
9 | protected readonly options: RmqOptions['options'];
|
10 | protected readonly logger: Logger;
|
11 | protected connection: Promise<any>;
|
12 | protected client: any;
|
13 | protected channel: any;
|
14 | protected urls: string[] | RmqUrl[];
|
15 | protected queue: string;
|
16 | protected queueOptions: any;
|
17 | protected responseEmitter: EventEmitter;
|
18 | protected replyQueue: string;
|
19 | protected persistent: boolean;
|
20 | protected noAssert: boolean;
|
21 | constructor(options: RmqOptions['options']);
|
22 | close(): void;
|
23 | connect(): Promise<any>;
|
24 | createChannel(): Promise<void>;
|
25 | createClient<T = any>(): T;
|
26 | mergeDisconnectEvent<T = any>(instance: any, source$: Observable<T>): Observable<T>;
|
27 | setupChannel(channel: any, resolve: Function): Promise<void>;
|
28 | consumeChannel(channel: any): Promise<void>;
|
29 | handleError(client: any): void;
|
30 | handleDisconnectError(client: any): void;
|
31 | handleMessage(packet: unknown, callback: (packet: WritePacket) => any): any;
|
32 | handleMessage(packet: unknown, options: Record<string, unknown>, callback: (packet: WritePacket) => any): any;
|
33 | protected publish(message: ReadPacket, callback: (packet: WritePacket) => any): () => void;
|
34 | protected dispatchEvent(packet: ReadPacket): Promise<any>;
|
35 | protected initializeSerializer(options: RmqOptions['options']): void;
|
36 | protected mergeHeaders(requestHeaders?: Record<string, string>): Record<string, string> | undefined;
|
37 | }
|