UNPKG

@amirmarmul/waba-common

Version:

![GitHub release](https://img.shields.io/github/v/release/amirmarmul/waba-common?style=flat-square)

17 lines (16 loc) 675 B
import { Event as EventContract } from "../../../core/domain/events/Event"; import { AmqpConnectionManager, Channel, ChannelWrapper } from "amqp-connection-manager"; export { Channel, ChannelWrapper }; export declare abstract class Event<T> implements EventContract { protected connection: AmqpConnectionManager; protected channel: ChannelWrapper; protected priority: number; protected payload: T; abstract exchange: string; abstract topic: string; constructor(payload: T); init(): this; protected setup(channel: Channel): void; publish(options?: {}): Promise<boolean>; publishWithoutPersistence(options?: {}): Promise<boolean>; }