Merge pull request #482 from jbonofre/AMQ-7407

[AMQ-7407] Fix best target election for queue/topic partitioning
This commit is contained in:
Jean-Baptiste Onofré 2020-02-28 07:32:22 +01:00 committed by GitHub
commit 702fb86887
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -254,6 +254,7 @@ public class PartitionBroker extends BrokerFilter {
for (Map.Entry<Target, Score> entry : targetScores.entrySet()) { for (Map.Entry<Target, Score> entry : targetScores.entrySet()) {
if (entry.getValue().value > bestScore) { if (entry.getValue().value > bestScore) {
bestTarget = entry.getKey(); bestTarget = entry.getKey();
bestScore = entry.getValue().value;
} }
} }
return bestTarget; return bestTarget;