interface ExchangeType { name: string; type: 'topic' | 'direct' | 'fanout'; } interface QueueType { name: string; bindings: Binding[]; incomingMessage(fromExchange: string, routingKey: string, message: object): Promise; } declare class Router { /** Mappings of exchange names to Exchange instances */ exchangeMappings: Record; /** Mappings of queue names to Queue instances */ queueMappings: Record; fanoutBindingMappings: Record>; directBindingMappings: Record>; topicBindingMappings: Record>; constructor(); addExchange(exchange: ExchangeType): void; addQueue(queue: QueueType): void; addQueueBinding(binding: Binding, queue: QueueType): void; routeMessage(exchangeName: string, properties: object, message: object): Promise; private _routeTopicMessage; private _routeDirectMessage; private _routeFanoutMessage; } declare const router: Router; export { Router }; export default router;