Package akka.actor.typed.scaladsl
Interface PoolRouter<T>
-
- All Known Implementing Classes:
PoolRouterBuilder
public interface PoolRouter<T>
Route messages by randomly selecting the routee from the available routees.Random routing makes it less likely that every
poolsize
message from a single producer ends up in the same mailbox of a slow actor.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PoolRouter<T>
withPoolSize(int poolSize)
Set a new pool size from the one set at constructionPoolRouter<T>
withRandomRouting()
Route messages by randomly selecting the routee from the available routees.PoolRouter<T>
withRoundRobinRouting()
Route messages through round robin, providing a fair distribution of messages across the routees.
-
-
-
Method Detail
-
withPoolSize
PoolRouter<T> withPoolSize(int poolSize)
Set a new pool size from the one set at construction- Parameters:
poolSize
- (undocumented)- Returns:
- (undocumented)
-
withRandomRouting
PoolRouter<T> withRandomRouting()
Route messages by randomly selecting the routee from the available routees.Random routing makes it less likely that every
poolsize
message from a single producer ends up in the same mailbox of a slow actor.- Returns:
- (undocumented)
-
withRoundRobinRouting
PoolRouter<T> withRoundRobinRouting()
Route messages through round robin, providing a fair distribution of messages across the routees.Round robin gives fair routing where every available routee gets the same amount of messages
This is the default for pool routers.
- Returns:
- (undocumented)
-
-