Skip to content

Commit

Permalink
[improve][broker] Improve Consumer.equals performance (#23864)
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari authored Jan 20, 2025
1 parent a96af72 commit 3c2ec2b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,9 @@ public CompletableFuture<Void> checkPermissionsAsync() {

@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj instanceof Consumer) {
Consumer other = (Consumer) obj;
return consumerId == other.consumerId && Objects.equals(cnx.clientAddress(), other.cnx.clientAddress());
Expand Down

0 comments on commit 3c2ec2b

Please sign in to comment.