} catch (RegistryException e) {
log.error("Error in getting registry for the tenant :" + tenantId ,e);
throw new BMConfigurationException("Error in getting registry for the tenant :"+tenantId ,e);
}
try {
brokerResource = registry.newResource();
Map<String, String> propertyMap = brokerConfiguration.getProperties();
brokerResource.addProperty("name", brokerConfiguration.getName());
brokerResource.addProperty("type", brokerConfiguration.getType());
for (Map.Entry<String, String> entry : propertyMap.entrySet()) {
brokerResource.addProperty(entry.getKey(), entry.getValue());