From a0819a95f3d2572ce969faf53266428da2c86db2 Mon Sep 17 00:00:00 2001 From: Roland Kuhn Date: Wed, 9 Mar 2016 21:50:56 +0100 Subject: [PATCH] #15120 BalancingPool semantics note for Java --- akka-docs/rst/java/routing.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/akka-docs/rst/java/routing.rst b/akka-docs/rst/java/routing.rst index f0aa17cd80..f47fe99d01 100644 --- a/akka-docs/rst/java/routing.rst +++ b/akka-docs/rst/java/routing.rst @@ -263,6 +263,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:: ../scala/code/docs/routing/RouterDocSpec.scala#config-balancing-pool