import amqp from 'amqplib' ; import { Options , Replies } from 'amqplib/properties' ; import { AmqpConfirmChannelInterface } from '../../interface/amqp/amqp-confirm-channel-interface' ; import { AmqpChannelService } from './amqp-channel-service' ; since date author Luminous
  export class AmqpConfirmChannelService extends AmqpChannelService implements AmqpConfirmChannelInterface { constructor ( name , currentConfirmChannel ) { super ( name , currentConfirmChannel ) ; } async sendMessageToExchange ( exchangeName , key , content , options ? , callback ? ) { return this . currentChannelInstance . publish ( exchangeName , key , content , options , callback ) ; } async sendMessageToQueue ( queueName , content , options ? , callback ? ) { return this . currentChannelInstance . sendToQueue ( queueName , content , options , callback ) ; } async waitForConfirms ( ) { if ( 'waitForConfirms' in this . currentChannelInstance ) { return this . currentChannelInstance . waitForConfirms ( ) ; } throw new Error ( `This Error Should Not Happened Current Channel: ${ this . currentChannelInstance }` ) ; } }