#15120 BalancingPool semantics note for Java

This commit is contained in:
Roland Kuhn 2016-03-09 21:50:56 +01:00
parent 3a1aa766b0
commit a0819a95f3

View file

@ -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