UNPKG

715 BTypeScriptView Raw
1export declare namespace rabbitmq {
2
3 export declare type ConsumeHandler = (message: any) => void;
4 export declare function create_channel(socketOptions? : object, url? : string, exchange_name?: string, is_use_channel_cache? : boolean): void;
5 export declare function send_message(mesasge: string | object, routing_key: string, channel?: any, options?: object): void;
6 export declare function consume_message_direct(routing_key: string, callback: ConsumeHandler, queue_name?: string, channel?: any): void;
7 export declare function consume_message_topic(routing_key: string, callback: ConsumeHandler, queue_name?: string, channel?: any): void;
8 export declare function close_connection(): void;
9}
10