Skip to content

Commit

Permalink
[improve][broker] Improve Consumer.equals performance (apache#23864)
Browse files Browse the repository at this point in the history
(cherry picked from commit 3c2ec2b)
(cherry picked from commit 69caf71)
  • Loading branch information
lhotari authored and nikhil-ctds committed Jan 31, 2025
1 parent 043c557 commit 69e638a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,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 69e638a

Please sign in to comment.