fix router discovering brokers with default names

This commit is contained in:
Xavier Léauté 2014-12-10 17:32:34 -08:00
parent 6104cad74a
commit 3abf348d2c
1 changed files with 3 additions and 3 deletions

View File

@ -184,7 +184,7 @@ public class TieredBrokerHostSelector<T> implements HostSelector<T>
brokerServiceName = tierConfig.getDefaultBrokerServiceName();
}
ServerDiscoverySelector retVal = selectorMap.get(CuratorServiceUtils.makeCanonicalServiceName(brokerServiceName));
ServerDiscoverySelector retVal = selectorMap.get(brokerServiceName);
if (retVal == null) {
log.error(
@ -192,7 +192,7 @@ public class TieredBrokerHostSelector<T> implements HostSelector<T>
brokerServiceName,
tierConfig.getDefaultBrokerServiceName()
);
retVal = selectorMap.get(CuratorServiceUtils.makeCanonicalServiceName(tierConfig.getDefaultBrokerServiceName()));
retVal = selectorMap.get(tierConfig.getDefaultBrokerServiceName());
}
return new Pair<>(brokerServiceName, retVal);
@ -201,7 +201,7 @@ public class TieredBrokerHostSelector<T> implements HostSelector<T>
public Pair<String, ServerDiscoverySelector> getDefaultLookup()
{
final String brokerServiceName = tierConfig.getDefaultBrokerServiceName();
final ServerDiscoverySelector retVal = selectorMap.get(CuratorServiceUtils.makeCanonicalServiceName(brokerServiceName));
final ServerDiscoverySelector retVal = selectorMap.get(brokerServiceName);
return new Pair<>(brokerServiceName, retVal);
}
}