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