import * as amqp from 'amqplib' ; import { Logger } from 'log4js' ; import { LogFactory } from '../factory/log-factory' ; /**
 * Amqp Original Channel Standard Data
 */ export class AmqpOriginalChannelWrapper { public readonly channel : amqp . Channel ; public readonly instanceName : string ; private readonly logger : Logger ; param { Channel } channel param { string } instanceName constructor ( channel , instanceName ) { this . channel = channel ; this . instanceName = instanceName ; this . logger = LogFactory . create ( instanceName . substr ( 0 , this . instanceName . lastIndexOf ( '-' ) ) ) ; this . logger . info ( `Creating Channel Wrapper ${ this . instanceName }` ) ; } return { Promise < void > } public async close ( ) { await this . channel . close ( ) ; this . logger . warn ( `Killed Channel ${ this . instanceName }` ) ; } }