@diy0r/nestjs-rabbitmq
Version:
Nestjs rabbitMQ module
25 lines (24 loc) • 864 B
TypeScript
import { Message, MessagePropertyHeaders } from 'amqplib';
import { IModuleBroker, IRmqErrorHeaders } from '../interfaces';
export declare class RmqErrorGlobalService {
private rmQoptions;
buildError(error: Error | RMQError): {};
errorHandler(msg: Message): any;
private isRMQError;
}
export declare class RmqErrorService extends RmqErrorGlobalService {
private readonly options;
constructor(options: IModuleBroker);
errorHandler(msg: Message): RMQError;
}
export declare class RMQError extends Error {
message: string;
service?: string;
status?: number;
date?: string;
host?: string;
constructor(message: string, service?: string, status?: number, host?: string, date?: string);
}
export declare class RMQErrorHandler {
static handle(headers: IRmqErrorHeaders | MessagePropertyHeaders): Error | RMQError;
}