Skip to content

deprecate BalancingDispatcherConfigurator and mark as internal API - #3391

Merged
He-Pin merged 1 commit into
mainfrom
worktree-deprecate-balancing-dispatcher-configurator
Jul 27, 2026
Merged

deprecate BalancingDispatcherConfigurator and mark as internal API#3391
He-Pin merged 1 commit into
mainfrom
worktree-deprecate-balancing-dispatcher-configurator

Conversation

@He-Pin

@He-Pin He-Pin commented Jul 27, 2026

Copy link
Copy Markdown
Member

Motivation

BalancingDispatcher has been deprecated since Akka 2.3 with the recommendation to use BalancingPool instead. The BalancingDispatcherConfigurator 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("Use BalancingPool instead of BalancingDispatcherConfigurator", "Pekko 2.0.0") annotation
  • Mark the class as private[pekko] (INTERNAL API)
  • Add @nowarn("msg=deprecated") to BalancingPool which uses the configurator 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 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 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

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
@He-Pin He-Pin added this to the 2.0.0-M4 milestone Jul 27, 2026
@He-Pin
He-Pin requested a review from pjfanning July 27, 2026 05:07

@pjfanning pjfanning left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@He-Pin
He-Pin merged commit 310711c into main Jul 27, 2026
10 checks passed
@He-Pin
He-Pin deleted the worktree-deprecate-balancing-dispatcher-configurator branch July 27, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants