@Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        TopicPartitionReplica other = (TopicPartitionReplica) obj;
        return partition == other.partition && brokerId == other.brokerId && topic.equals(other.topic);
    }
The topic name, partition number and the brokerId of the replica
clients/src/main/java/org/apache/kafka/common/TopicPartitionReplica.java