public static String buildExchangeName ( MessagingContext ctx ) { String exchangeName ; if ( ctx . getKind ( ) == RecipientKind . DM ) exchangeName = buildExchangeNameForTheDm ( ctx . getDomain ( ) ) ; else if ( ctx . getKind ( ) == RecipientKind . INTER_APP ) exchangeName = buildExchangeNameForInterApp ( ctx . getDomain ( ) ) ; else exchangeName = RabbitMqUtils . buildExchangeNameForAgent ( ctx . getDomain ( ) , ctx . getApplicationName ( ) ) ; return exchangeName ; }
Builds an exchange name from a messaging context .