UNPKG

1.09 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 readonly urls: string[] | RmqUrl[];
11 protected readonly queue: string;
12 protected readonly prefetchCount: number;
13 protected readonly queueOptions: any;
14 protected readonly isGlobalPrefetchCount: boolean;
15 constructor(options: RmqOptions['options']);
16 listen(callback: () => void): Promise<void>;
17 close(): void;
18 start(callback?: () => void): Promise<void>;
19 createClient<T = any>(): T;
20 setupChannel(channel: any, callback: Function): Promise<void>;
21 handleMessage(message: Record<string, any>, channel: any): Promise<void>;
22 sendMessage<T = any>(message: T, replyTo: any, correlationId: string): void;
23}