deprecate BalancingDispatcherConfigurator and mark as internal API - #3391
Merged
He-Pin merged 1 commit intoJul 27, 2026
Merged
Conversation
Motivation: BalancingDispatcher has been deprecated since Akka 2.3 with the recommendation to use BalancingPool instead. The configurator class remained public and unmarked. Since Pekko 2.0.0 is a major release, it is time to deprecate and restrict visibility. Modification: - Add @deprecated annotation to BalancingDispatcherConfigurator - Mark the class as private[pekko] (INTERNAL API) - Add @nowarn to BalancingPool which uses it internally - Update Scaladoc to indicate INTERNAL API Result: BalancingDispatcherConfigurator is no longer part of the public API. BalancingPool continues to work as the supported replacement. Users who referenced the configurator by full class name in config will see deprecation warnings at compile time if they use it directly in code. Tests: - sbt "actor-tests/Test/testOnly org.apache.pekko.actor.dispatch.BalancingDispatcherSpec org.apache.pekko.actor.dispatch.DispatchersSpec org.apache.pekko.actor.ActorConfigurationVerificationSpec" — 33 tests passed - sbt "actor-tests/Test/testOnly org.apache.pekko.actor.dispatch.BalancingDispatcherModelSpec" — 10 tests passed - sbt "actor-tests/Test/testOnly org.apache.pekko.actor.ActorMailboxSpec" — 33 tests passed - sbt "actor/mimaReportBinaryIssues" — no issues References: Refs #3384, Refs #2168
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
BalancingDispatcherhas been deprecated since Akka 2.3 with the recommendation to useBalancingPoolinstead. TheBalancingDispatcherConfiguratorclass remained public and unmarked. Since Pekko 2.0.0 is a major release, it is time to deprecate and restrict visibility.Modification
@deprecated("Use BalancingPool instead of BalancingDispatcherConfigurator", "Pekko 2.0.0")annotationprivate[pekko](INTERNAL API)@nowarn("msg=deprecated")toBalancingPoolwhich uses the configurator internallyResult
BalancingDispatcherConfiguratoris no longer part of the public API.BalancingPoolcontinues to work as the supported replacement. Users who referenced the configurator by full class name in config will still work (reflection-based loading is unaffected by Scala access modifiers), but direct code usage will produce deprecation warnings.Tests
sbt "actor-tests/Test/testOnly org.apache.pekko.actor.dispatch.BalancingDispatcherSpec org.apache.pekko.actor.dispatch.DispatchersSpec org.apache.pekko.actor.ActorConfigurationVerificationSpec"— 33 tests passedsbt "actor-tests/Test/testOnly org.apache.pekko.actor.dispatch.BalancingDispatcherModelSpec"— 10 tests passedsbt "actor-tests/Test/testOnly org.apache.pekko.actor.ActorMailboxSpec"— 33 tests passedsbt "actor/mimaReportBinaryIssues"— no issuesReferences
Refs #3384, Refs #2168