### Search before asking - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar. ### Motivation 1. batch `subscription.acknowledgeMesage` in filterEntriesForConsumer loop 2. remove unnecessary Optional package parameter for `filterEntriesForConsumer` metadataArray 3. avoid call O(consumer) times of `topic.getMigratedClusterUrl` in `checkAndApplyReachedEndOfTopicOrTopicMigration` ### Solution _No response_ ### Alternatives _No response_ ### Anything else? _No response_ ### Are you willing to submit a PR? - [X] I'm willing to submit a PR!