import { Event , Command , MessageAttributes } from '@node-ts/bus-messages' ; import { CoreDependencies } from '../util' ; import { HandlerRegistry } from '../handler' ; import { TransportMessage } from './transport-message' ; /**
 * A transport adapter interface that enables the service bus to use a messaging technology.
 */ export interface Transport < TransportMessageType = { } > { param event param messageOptions publish < TEvent extends Event > ( event , messageOptions ? ) : Promise < void > ; param command param messageOptions send < TCommand extends Command > ( command , messageOptions ? ) : Promise < void > ; /**
     * Forwards @param transportMessage to the dead letter queue. The message must have been read in from the
     * queue and have a receipt handle.
     */ fail ( transportMessage ) : Promise < void > ; /**
     * Forwards @param transportMessage to the dead letter queue. The message must have been read in from the
     * queue and have a receipt handle.
     */ fail ( transportMessage ) : Promise < void > ; returns readNextMessage ( ) : Promise < TransportMessage < TransportMessageType > | undefined > ; param message deleteMessage ( message ) : Promise < void > ; param message returnMessage ( message ) : Promise < void > ; param coreDependencies prepare ( coreDependencies ) : void ; /**
     * An optional function that will be called on startup. This gives a chance for the transport
     * to establish any connections to the underlying infrastructure.
     */ connect ? ( ) : Promise < void > ; /**
     * An optional function that will be called on shutdown. This gives a chance for the transport
     * to close any connections to the underlying infrastructure.
     */ disconnect ? ( ) : Promise < void > ; param handlerRegistry initialize ? ( handlerRegistry ) : Promise < void > ; /**
     * An optional function that will be called when the service bus is shutting down. This is an
     * opportunity for the transport to close out any open requests to fetch messages etc.
     */ dispose ? ( ) : Promise < void > ; }