import amqp from 'amqplib' ; export class Common { public static convertMessage ( msg ) { let res = null ; if ( msg ) { try { res = JSON . parse ( msg . content . toString ( ) ) ; } catch ( e ) { res = msg . content . toString ( ) ; } } return res ; } }