Skip to content

Commit

Permalink
Fix config blocks in classic remoting docs (akka#26851)
Browse files Browse the repository at this point in the history
* Fix config blocks in classic remoting docs

* Update akka-docs/src/main/paradox/remoting.md

* Update akka-docs/src/main/paradox/remoting.md
  • Loading branch information
chbatey authored and patriknw committed May 2, 2019
1 parent 267d96e commit e2fafb9
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ object StatsSampleSpecConfig extends MultiNodeConfig {
// note that no fixed host names and ports are used
commonConfig(ConfigFactory.parseString("""
akka.actor.provider = cluster
akka.remote.log-remote-lifecycle-events = off
akka.remote.classic.log-remote-lifecycle-events = off
akka.cluster.roles = [compute]
#//#router-lookup-config
akka.actor.deployment {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ abstract class ClusterShardingFailureSpecConfig(val mode: String) extends MultiN
commonConfig(ConfigFactory.parseString(s"""
akka.loglevel = INFO
akka.actor.provider = "cluster"
akka.remote.log-remote-lifecycle-events = off
akka.remote.classic.log-remote-lifecycle-events = off
akka.cluster.auto-down-unreachable-after = 0s
akka.cluster.roles = ["backend"]
akka.persistence.journal.plugin = "akka.persistence.journal.leveldb-shared"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ object ClusterShardingGetStatsSpecConfig extends MultiNodeConfig {
commonConfig(ConfigFactory.parseString("""
akka.loglevel = INFO
akka.actor.provider = "cluster"
akka.remote.log-remote-lifecycle-events = off
akka.remote.classic.log-remote-lifecycle-events = off
akka.log-dead-letters-during-shutdown = off
akka.cluster.auto-down-unreachable-after = 0s
akka.cluster.sharding {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ abstract class ClusterShardingLeavingSpecConfig(val mode: String) extends MultiN
commonConfig(ConfigFactory.parseString(s"""
akka.loglevel = INFO
akka.actor.provider = "cluster"
akka.remote.log-remote-lifecycle-events = off
akka.remote.classic.log-remote-lifecycle-events = off
akka.cluster.auto-down-unreachable-after = 0s
akka.persistence.journal.plugin = "akka.persistence.journal.leveldb-shared"
akka.persistence.journal.leveldb-shared {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ abstract class ClusterShardingRememberEntitiesNewExtractorSpecConfig(val mode: S
commonConfig(ConfigFactory.parseString(s"""
akka.actor.provider = "cluster"
akka.cluster.auto-down-unreachable-after = 0s
akka.remote.log-remote-lifecycle-events = off
akka.remote.classic.log-remote-lifecycle-events = off
akka.persistence.journal.plugin = "akka.persistence.journal.leveldb-shared"
akka.persistence.journal.leveldb-shared {
timeout = 5s
Expand Down
28 changes: 13 additions & 15 deletions akka-docs/src/main/paradox/remoting.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@ To use Akka Remoting, you must add the following dependency in your project:

## Configuration

To enable remote capabilities in your Akka project you should, at a minimum, add the following changes
To enable classic remoting in your Akka project you should, at a minimum, add the following changes
to your `application.conf` file:

```
akka {
actor {
provider = remote
}
remote {
remote.artery.enabled = false
remote.classic {
enabled-transports = ["akka.remote.classic.netty.tcp"]
netty.tcp {
hostname = "127.0.0.1"
Expand All @@ -50,9 +51,10 @@ akka {
}
```

As you can see in the example above there are four things you need to add to get started:
As you can see in the example above there are five things you need to add to get started:

* Change provider from `local` to `remote`
* Disable artery remoting. Artery is the default remoting implementation since `2.6.0`
* Add host name - the machine you want to run the actor system on; this host
name is exactly what is passed to remote systems in order to identify this
system and consequently used for connecting back to this system if need be,
Expand Down Expand Up @@ -408,8 +410,8 @@ finished.

@@@ note

In order to switch off the logging, set
`akka.remote.log-remote-lifecycle-events = off` in your
In order to disable the logging, set
`akka.remote.classic.log-remote-lifecycle-events = off` in your
`application.conf`.

@@@
Expand Down Expand Up @@ -456,7 +458,7 @@ An example of setting up the default Netty based SSL driver as default:

```
akka {
remote {
remote.classic {
enabled-transports = [akka.remote.classic.netty.ssl]
}
}
Expand All @@ -466,7 +468,7 @@ Next the actual SSL/TLS parameters have to be configured:

```
akka {
remote {
remote.classic {
netty.ssl {
hostname = "127.0.0.1"
port = "3553"
Expand Down Expand Up @@ -540,7 +542,7 @@ that system down. This is not always desired, and it can be disabled with the
following setting:

```
akka.remote.untrusted-mode = on
akka.remote.classic.untrusted-mode = on
```

This disallows sending of system messages (actor life-cycle commands,
Expand All @@ -566,7 +568,7 @@ permission to receive actor selection messages can be granted to specific actors
defined in configuration:

```
akka.remote.trusted-selection-paths = ["/user/receptionist", "/user/namingService"]
akka.remote.classic.trusted-selection-paths = ["/user/receptionist", "/user/namingService"]
```

The actual message must still not be of type `PossiblyHarmful`.
Expand Down Expand Up @@ -619,17 +621,13 @@ containers the hostname and port pair that Akka binds to will be different than
host name and port pair that is used to connect to the system from the outside. This requires
special configuration that sets both the logical and the bind pairs for remoting.

```ruby
akka {
remote {
netty.tcp {
```
akka.remote.classic.netty.tcp {
hostname = my.domain.com # external (logical) hostname
port = 8000 # external (logical) port
bind-hostname = local.address # internal (bind) hostname
bind-port = 2552 # internal (bind) port
}
}
}
```

Expand Down

0 comments on commit e2fafb9

Please sign in to comment.