Class SmallestMailboxRoutingLogic
This class contains logic used by a Router to route a message to a Routee determined using smallest-mailbox. This process has the router select a routee based on the fewest number of messages in its routees' mailbox. The selection is done in the following order:
- Pick any routee with an empty mailbox.
- Pick a routee with the fewest pending messages in its mailbox.
- Pick any remaining routees.
note
Remote routees are consider lowest priority, since their mailbox size is unknown.
note
For the case, when all routees are of unpredictable size, the selection process fails back to round-robin.
Implements
Inherited Members
Namespace: Akka.Routing
Assembly: Akka.dll
Syntax
public sealed class SmallestMailboxRoutingLogic : RoutingLogic, INoSerializationVerificationNeeded
Constructors
| Improve this Doc View SourceSmallestMailboxRoutingLogic()
Initializes a new instance of the SmallestMailboxRoutingLogic class.
Declaration
public SmallestMailboxRoutingLogic()
SmallestMailboxRoutingLogic(Int32)
Initializes a new instance of the SmallestMailboxRoutingLogic class.
Declaration
public SmallestMailboxRoutingLogic(int next)
Parameters
Type | Name | Description |
---|---|---|
Int32 | next | Seed value used in the fallback selection process. |
Methods
| Improve this Doc View SourceSelect(Object, Routee[])
Picks a Routee to receive the message
.
Declaration
public override Routee Select(object message, Routee[] routees)
Parameters
Type | Name | Description |
---|---|---|
Object | message | The message that is being routed |
Routee[] | routees | A collection of routees to choose from when receiving the |
Returns
Type | Description |
---|---|
Routee | A Routee that receives the |