Skip to content

Commit 5c41aa3

Browse files
committed
Use Pekko ports
1 parent e904673 commit 5c41aa3

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

play-java-pekko-cluster-example/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ In the terminals you should see activity like:
6767

6868

6969
```
70-
2020-09-01 11:40:45 INFO org.apache.pekko.cluster.Cluster Cluster(pekko://application) Cluster Node [pekko://[email protected]:25521] - Node [pekko://[email protected]:25521] is JOINING itself (with roles [dc-default]) and forming new cluster
71-
2020-09-01 11:40:45 INFO org.apache.pekko.cluster.Cluster Cluster(pekko://application) Cluster Node [pekko://[email protected]:25521] - is the new leader among reachable nodes (more leaders may exist)
72-
2020-09-01 11:40:45 INFO org.apache.pekko.cluster.Cluster Cluster(pekko://application) Cluster Node [pekko://[email protected]:25521] - Leader is moving node [pekko://[email protected]:25521] to [Up]
70+
2020-09-01 11:40:45 INFO org.apache.pekko.cluster.Cluster Cluster(pekko://application) Cluster Node [pekko://[email protected]:73551] - Node [pekko://[email protected]:73551] is JOINING itself (with roles [dc-default]) and forming new cluster
71+
2020-09-01 11:40:45 INFO org.apache.pekko.cluster.Cluster Cluster(pekko://application) Cluster Node [pekko://[email protected]:73551] - is the new leader among reachable nodes (more leaders may exist)
72+
2020-09-01 11:40:45 INFO org.apache.pekko.cluster.Cluster Cluster(pekko://application) Cluster Node [pekko://[email protected]:73551] - Leader is moving node [pekko://[email protected]:73551] to [Up]
7373
```
7474

75-
The logs above indicate node 1 (identified as `pekko://[email protected]:25521`) and node 2 (identified as `pekko://[email protected]:25522
76-
`) have seen each other and established a connection, then `pekko://[email protected]:25521` became the leader and that leader decided to mark
77-
`pekko://[email protected]:25521`'s status as `Up`. Finally, the singleton `counter-actor` that we use on this sample app is available. You
78-
should also see, in the logs, how the node 3 (identified as `pekko://[email protected]:25523`) also joins the cluster.
75+
The logs above indicate node 1 (identified as `pekko://[email protected]:73551`) and node 2 (identified as `pekko://[email protected]:73552
76+
`) have seen each other and established a connection, then `pekko://[email protected]:73551` became the leader and that leader decided to mark
77+
`pekko://[email protected]:73551`'s status as `Up`. Finally, the singleton `counter-actor` that we use on this sample app is available. You
78+
should also see, in the logs, how the node 3 (identified as `pekko://[email protected]:73553`) also joins the cluster.
7979

8080
Finally, open three browser tabs to the URLs http://localhost:9001/, http://localhost:9002/, and http://localhost:9003/ (each points to a different
8181
Play instance) and interact with the UI. Note how all three increment a single counter in the singleton.

play-java-pekko-cluster-example/conf/local-shared.conf

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ play {
66
}
77

88
pekko.cluster.seed-nodes = [
9-
"pekko://[email protected]:25521",
10-
"pekko://[email protected]:25522"
11-
]
9+
"pekko://[email protected]:73551",
10+
"pekko://[email protected]:73552"
11+
]
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
include "application"
22
include "local-shared"
33

4-
pekko.remote.artery.canonical.port = 25521
4+
pekko.remote.artery.canonical.port = 73551
55
http.port = 9001
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
include "application"
22
include "local-shared"
33

4-
pekko.remote.artery.canonical.port = 25522
4+
pekko.remote.artery.canonical.port = 73552
55
http.port = 9002
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
include "application"
22
include "local-shared"
33

4-
pekko.remote.artery.canonical.port = 25523
4+
pekko.remote.artery.canonical.port = 73553
55
http.port = 9003

play-scala-secure-session-example/app/services/session/ClusterSystem.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import scala.concurrent.Future
1717
* same while you had several different ip addresses.
1818
*/
1919
class ClusterSystem @Inject() (configuration: Configuration, applicationLifecycle: ApplicationLifecycle) {
20-
private val systems = startup(Seq("2551", "2552"))
20+
private val systems = startup(Seq("7354", "7355"))
2121

2222
def startup(ports: Seq[String]): Seq[ActorSystem] = {
2323
ports.map { port =>

play-scala-secure-session-example/conf/application.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ pekko {
4444

4545
min-nr-of-members = 2
4646
seed-nodes = [
47-
"pekko://"${play.pekko.actor-system}"@127.0.0.1:2551",
48-
"pekko://"${play.pekko.actor-system}"@127.0.0.1:2552"
47+
"pekko://"${play.pekko.actor-system}"@127.0.0.1:7354",
48+
"pekko://"${play.pekko.actor-system}"@127.0.0.1:7355"
4949
]
5050
}
5151
}

0 commit comments

Comments
 (0)