fix managerName to use pekko (#587)

* fix managerName to use `pekko`

* make name configurable

* Update PekkoProtocolTransport.scala
This commit is contained in:
PJ Fanning 2024-01-16 13:53:57 +01:00 committed by GitHub
parent bd8ee25b80
commit 11ba3d7bef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -267,6 +267,8 @@ pekko {
### Configuration for classic remoting. Classic remoting is deprecated, use artery.
# Used as part of the Actor name for the Protocol Manager.
manager-name-prefix = "pekkoprotocolmanager"
# If set to a nonempty string remoting will use the given dispatcher for
# its internal actors otherwise the default dispatcher is used. Please note

View file

@ -69,6 +69,8 @@ private[remote] class PekkoProtocolSettings(config: Config) {
.getMillisDuration("pekko.remote.classic.handshake-timeout")
.requiring(_ > Duration.Zero, "handshake-timeout must be > 0")
}
val ManagerNamePrefix: String = config.getString("pekko.remote.classic.manager-name-prefix")
}
@nowarn("msg=deprecated")
@ -136,7 +138,8 @@ private[remote] class PekkoProtocolTransport(
}
override val maximumOverhead: Int = PekkoProtocolTransport.PekkoOverhead
protected def managerName = s"akkaprotocolmanager.${wrappedTransport.schemeIdentifier}${UniqueId.getAndIncrement}"
protected def managerName =
s"${settings.ManagerNamePrefix}.${wrappedTransport.schemeIdentifier}${UniqueId.getAndIncrement}"
protected def managerProps = {
val wt = wrappedTransport
val s = settings