=doc #3868 Clarify remote router group

This commit is contained in:
Patrik Nordwall 2014-02-11 14:48:24 +01:00
parent f1edf78979
commit cafa6585ce
5 changed files with 52 additions and 32 deletions

View file

@ -251,24 +251,21 @@ Routers with Remote Destinations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It is absolutely feasible to combine remoting with :ref:`routing-java`.
This is also done via configuration::
akka {
actor {
deployment {
/serviceA/aggregation {
router = "round-robin-pool"
nr-of-instances = 10
target {
nodes = ["akka.tcp://app@10.0.0.2:2552", "akka://app@10.0.0.3:2552"]
}
}
}
}
}
A pool of remote deployed routees can be configured as:
This configuration setting will clone the actor “aggregation” 10 times and deploy it evenly distributed across
the two given target nodes.
.. includecode:: ../scala/code/docs/routing/RouterDocSpec.scala#config-remote-round-robin-pool
This configuration setting will clone the actor defined in the ``Props`` of the ``remotePool`` 10
times and deploy it evenly distributed across the two given target nodes.
A group of remote actors can be configured as:
.. includecode:: ../scala/code/docs/routing/RouterDocSpec.scala#config-remote-round-robin-group
This configuration setting will send messages to the defined remote actor paths.
It requires that you create the destination actors on the remote nodes with matching paths.
That is not done by the router.
.. _remote-sample-java:

View file

@ -187,6 +187,8 @@ The routee actors are created externally from the router:
The paths may contain protocol and address information for actors running on remote hosts.
Remoting requires the ``akka-remote`` module to be included in the classpath.
.. includecode:: ../scala/code/docs/routing/RouterDocSpec.scala#config-remote-round-robin-group
Router usage
^^^^^^^^^^^^

View file

@ -149,6 +149,28 @@ akka.actor.deployment {
}
#//#config-consistent-hashing-group
#//#config-remote-round-robin-pool
akka.actor.deployment {
/parent/remotePool {
router = round-robin-pool
nr-of-instances = 10
target.nodes = ["akka.tcp://app@10.0.0.2:2552", "akka://app@10.0.0.3:2552"]
}
}
#//#config-remote-round-robin-pool
#//#config-remote-round-robin-group
akka.actor.deployment {
/parent/remoteGroup {
router = round-robin-group
routees.paths = [
"akka.tcp://app@10.0.0.1:2552/user/workers/w1",
"akka.tcp://app@10.0.0.2:2552/user/workers/w1",
"akka.tcp://app@10.0.0.3:2552/user/workers/w1"]
}
}
#//#config-remote-round-robin-group
#//#config-resize-pool
akka.actor.deployment {
/parent/router25 {

View file

@ -257,24 +257,21 @@ Routers with Remote Destinations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It is absolutely feasible to combine remoting with :ref:`routing-scala`.
This is also done via configuration::
akka {
actor {
deployment {
/serviceA/aggregation {
router = "round-robin-pool"
nr-of-instances = 10
target {
nodes = ["akka.tcp://app@10.0.0.2:2552", "akka.tcp://app@10.0.0.3:2552"]
}
}
}
}
}
A pool of remote deployed routees can be configured as:
This configuration setting will clone the actor “aggregation” 10 times and deploy it evenly distributed across
the two given target nodes.
.. includecode:: ../scala/code/docs/routing/RouterDocSpec.scala#config-remote-round-robin-pool
This configuration setting will clone the actor defined in the ``Props`` of the ``remotePool`` 10
times and deploy it evenly distributed across the two given target nodes.
A group of remote actors can be configured as:
.. includecode:: ../scala/code/docs/routing/RouterDocSpec.scala#config-remote-round-robin-group
This configuration setting will send messages to the defined remote actor paths.
It requires that you create the destination actors on the remote nodes with matching paths.
That is not done by the router.
.. _remote-sample-scala:

View file

@ -186,6 +186,8 @@ The routee actors are created externally from the router:
The paths may contain protocol and address information for actors running on remote hosts.
Remoting requires the ``akka-remote`` module to be included in the classpath.
.. includecode:: code/docs/routing/RouterDocSpec.scala#config-remote-round-robin-group
Router usage
^^^^^^^^^^^^