1 | import { RmqContext } from '../ctx-host';
|
2 | import { Transport } from '../enums';
|
3 | import { RmqUrl } from '../external/rmq-url.interface';
|
4 | import { CustomTransportStrategy, RmqOptions } from '../interfaces';
|
5 | import { ReadPacket } from '../interfaces/packet.interface';
|
6 | import { Server } from './server';
|
7 |
|
8 |
|
9 |
|
10 | export declare class ServerRMQ extends Server implements CustomTransportStrategy {
|
11 | protected readonly options: RmqOptions['options'];
|
12 | readonly transportId = Transport.RMQ;
|
13 | protected server: any;
|
14 | protected channel: any;
|
15 | protected connectionAttempts: number;
|
16 | protected readonly urls: string[] | RmqUrl[];
|
17 | protected readonly queue: string;
|
18 | protected readonly prefetchCount: number;
|
19 | protected readonly noAck: boolean;
|
20 | protected readonly queueOptions: any;
|
21 | protected readonly isGlobalPrefetchCount: boolean;
|
22 | protected readonly noAssert: boolean;
|
23 | constructor(options: RmqOptions['options']);
|
24 | listen(callback: (err?: unknown, ...optionalParams: unknown[]) => void): Promise<void>;
|
25 | close(): void;
|
26 | start(callback?: (err?: unknown, ...optionalParams: unknown[]) => void): Promise<void>;
|
27 | createClient<T = any>(): T;
|
28 | setupChannel(channel: any, callback: Function): Promise<void>;
|
29 | handleMessage(message: Record<string, any>, channel: any): Promise<void>;
|
30 | handleEvent(pattern: string, packet: ReadPacket, context: RmqContext): Promise<any>;
|
31 | sendMessage<T = any>(message: T, replyTo: any, correlationId: string): void;
|
32 | protected initializeSerializer(options: RmqOptions['options']): void;
|
33 | private parseMessageContent;
|
34 | }
|