Replace ClusterRouterGroup/Pool "use-role" with "use-role-set" #23496
This commit is contained in:
parent
5477a6f92d
commit
a95a94acff
22 changed files with 445 additions and 96 deletions
|
|
@ -57,7 +57,7 @@ abstract class StatsService2 extends Actor {
|
|||
val workerRouter = context.actorOf(
|
||||
ClusterRouterGroup(ConsistentHashingGroup(Nil), ClusterRouterGroupSettings(
|
||||
totalInstances = 100, routeesPaths = List("/user/statsWorker"),
|
||||
allowLocalRoutees = true, useRole = Some("compute"))).props(),
|
||||
allowLocalRoutees = true, useRoles = Set("compute"))).props(),
|
||||
name = "workerRouter2")
|
||||
//#router-lookup-in-code
|
||||
}
|
||||
|
|
@ -71,7 +71,7 @@ abstract class StatsService3 extends Actor {
|
|||
val workerRouter = context.actorOf(
|
||||
ClusterRouterPool(ConsistentHashingPool(0), ClusterRouterPoolSettings(
|
||||
totalInstances = 100, maxInstancesPerNode = 3,
|
||||
allowLocalRoutees = false, useRole = None)).props(Props[StatsWorker]),
|
||||
allowLocalRoutees = false)).props(Props[StatsWorker]),
|
||||
name = "workerRouter3")
|
||||
//#router-deploy-in-code
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue