def METHOD_NAME(domain, rule_id):
    rule = get_cached_rule(domain, rule_id)
    if not rule:
        return
    progress_helper = MessagingRuleProgressHelper(rule_id)
    total_cases_count = CaseES().domain(domain).case_type(rule.case_type).count()
    progress_helper.set_total_cases_to_be_processed(total_cases_count)
    db_aliases = get_db_aliases_for_partitioned_query()
    progress_helper.set_initial_progress(shard_count=len(db_aliases))
    for db_alias in db_aliases:
        run_messaging_rule_for_shard.delay(domain, rule_id, db_alias)