Refactored use of the DefaultMessageListener so it's retrieved from the InternalContext

This commit is contained in:
2016-09-12 08:18:30 +02:00
parent a240606909
commit 489b8968e0
15 changed files with 180 additions and 173 deletions

View File

@ -105,7 +105,7 @@ public class JdbcNodeRegistry extends JdbcHelper implements NodeRegistry {
}
for (long stream : streams) {
Set<NetworkAddress> nodes = stableNodes.get(stream);
if (nodes != null) {
if (nodes != null && !nodes.isEmpty()) {
result.add(Collections.selectRandom(nodes));
}
}