codelipenghui commented on a change in pull request #6398: [Minor] Fix java
code errors reported by lgtm.
URL: https://github.com/apache/pulsar/pull/6398#discussion_r383000970
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
##########
@@ -1756,6 +1756,14 @@ public int hashCode() {
return Objects.hash(topic, subscription, consumerName);
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof ConsumerImpl)) return false;
+ ConsumerImpl<?> consumer = (ConsumerImpl<?>) o;
+ return consumerId == consumer.consumerId;
Review comment:
Shall we need to add the topic name? because the consumer ID not globally
unique
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services