From 3a1aa766b0e0564dab098eaf12d4ed6dae3feb5a Mon Sep 17 00:00:00 2001 From: Roland Kuhn Date: Wed, 9 Mar 2016 21:49:38 +0100 Subject: [PATCH] #15120 BalancingPool semantics note for Scala --- akka-docs/rst/scala/routing.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/akka-docs/rst/scala/routing.rst b/akka-docs/rst/scala/routing.rst index bc02284ff6..bba212da76 100644 --- a/akka-docs/rst/scala/routing.rst +++ b/akka-docs/rst/scala/routing.rst @@ -262,6 +262,19 @@ BalancingPool A Router that will try to redistribute work from busy routees to idle routees. All routees share the same mailbox. +.. note:: + + The BalancingPool has the property that its routees do not have truly distinct + identity: they have different names, but talking to them will not end up at the + right actor in most cases. Therefore you cannot use it for workflows that + require state to be kept within the routee, you would in this case have to + include the whole state in the messages. + + With a `SmallestMailboxPool`_ you can have a vertically scaling service that + can interact in a stateful fashion with other services in the back-end before + replying to the original client. The other advantage is that it does not place + a restriction on the message queue implementation as BalancingPool does. + BalancingPool defined in configuration: .. includecode:: code/docs/routing/RouterDocSpec.scala#config-balancing-pool