UNPKG

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