/**
 * A topic where messages can be published
 */ export interface ITopic { /**
     * Emits an event to the topic
     */ emit ( event , ... args ) ; } /**
 * Basic interface used to publish messages to a topic
 */ export interface IPublisher < T = any > { /**
     * Subscribe to events about the publisher
     */ on ( event , listener ) ; /**
     * Used to send messages to a topic
     */ to ( topic ) : ITopic ; /**
     * Used to emit an event to a topic
     * This will be used in place of "to().emit()" when defined
     */ emit ? ( topic , event , ... args ) : Promise < void > ; /**
     * Used to emit a batch to a topic
     * This will be used in place of "to().emit()" & "emit()" when defined
     */ emitBatch ? ( topic , batch ) : Promise < void > ; /**
     * Closes the publisher
     */ close ( ) : Promise < void > ; } export interface IMessageBatch < T > { /**
     * Tenant id for the batch
     */ tenantId : string ; /**
     * Document id for the batch
     */ documentId : string ; /**
     * Event name (topic)
     */ event : string ; /**
     * List of messages
     */ messages : T [ ] ; }