/** * Load Publisher (RabbitMQ) credentials * @return credentials */ private PublisherCredentials loadPublisherCredentials() { PublisherCredentials publisherCredentials = new PublisherCredentials(); publisherCredentials.setPublisherHost(properties.getProperty("PublisherHost")); publisherCredentials.setPublisherUsername(properties.getProperty("PublisherUsername")); publisherCredentials.setPublisherPassword(properties.getProperty("PublisherPassword")); publisherCredentials.setPublisherPort(Integer.parseInt(properties.getProperty("PublisherPort"))); publisherCredentials.setPublisherVirtualHost(properties.getProperty("PublisherVirtualHost")); publisherCredentials.setRoutingKeyPublishUDRCommand(properties.getProperty("RoutingKeyPublishUDRCommand")); // publisher dispatch exchange name String dispatch = properties.getProperty("PublisherDispatchExchange"); if (dispatch != null && !dispatch.isEmpty()) { publisherCredentials.setPublisherDispatchExchange(dispatch); } else { publisherCredentials.setPublisherDispatchExchange(PublisherCredentials.DEFAULT_PUBLISHER_DISPATCH_EXCHANGE); } // publisher dispatch exchange name String broadcast = properties.getProperty("PublisherBroadcastExchange"); if (broadcast != null && !broadcast.isEmpty()) { publisherCredentials.setPublisherBroadcastExchange(broadcast); } else { publisherCredentials.setPublisherBroadcastExchange(PublisherCredentials.DEFAULT_PUBLISHER_BROADCAST_EXCHANGE); } return publisherCredentials; }