#15120 BalancingPool semantics note for Java
This commit is contained in:
parent
3a1aa766b0
commit
a0819a95f3
1 changed files with 13 additions and 0 deletions
|
|
@ -263,6 +263,19 @@ BalancingPool
|
||||||
A Router that will try to redistribute work from busy routees to idle routees.
|
A Router that will try to redistribute work from busy routees to idle routees.
|
||||||
All routees share the same mailbox.
|
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:
|
BalancingPool defined in configuration:
|
||||||
|
|
||||||
.. includecode:: ../scala/code/docs/routing/RouterDocSpec.scala#config-balancing-pool
|
.. includecode:: ../scala/code/docs/routing/RouterDocSpec.scala#config-balancing-pool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue