* Log a warning if 'akka.remote.log-frame-size-exceeding' contains a bad value
Currently, if 'akka.remote.log-frame-size-exceeding' is accidentally set
to an invalid value (e.g. 'on') the developer does not get warned but
remote communication fails with a not-very-helpful error message:
```
[INFO] [06/29/2018 15:07:41.657] [run-main-0] [akka.remote.Remoting] Starting remoting
[INFO] [06/29/2018 15:07:41.847] [run-main-0] [akka.remote.Remoting] Remoting started; listening on addresses :[akka.tcp://akkaremotenull@localhost:2553]
[INFO] [06/29/2018 15:07:41.849] [run-main-0] [akka.remote.Remoting] Remoting now listens on addresses: [akka.tcp://akkaremotenull@localhost:2553]
[WARN] [06/29/2018 15:07:41.986] [akkaremotenull-akka.remote.default-remote-dispatcher-5] [akka.tcp://akkaremotenull@localhost:2553/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2Fakkaremotenull%40localhost%3A2552-0] Association with remote system [akka.tcp://akkaremotenull@localhost:2552] has failed, address is now gated for [5000] ms. Reason: [akka://akkaremotenull/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2Fakkaremotenull%40localhost%3A2552-0/endpointWriter: exception during creation] Caused by: [null]
[INFO] [06/29/2018 15:07:41.993] [akkaremotenull-akka.actor.default-dispatcher-3] [akka://akkaremotenull/deadLetters] Message [io.ino.akkaremotenull.Greeter$Greet] from Actor[akka://akkaremotenull/temp/$a] to Actor[akka://akkaremotenull/deadLetters] was not delivered. [1] dead letters encountered. If this is not an expected behavior, then [Actor[akka://akkaremotenull/deadLetters]] may have terminated unexpectedly, This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
```
This commit fixes the issue by a) printing a warning message and b)
ignoring the config setting.
* Adress review comments
Allows value 'off' for 'akka.remote.log-frame-size-exceeding' to be more
tolerant and now logs the original error message of the ConfigException
caught when parsing an invalid value:
```
[WARN] [07/05/2018 09:13:19.544] [akkaremotenull-akka.remote.default-remote-dispatcher-13] [RemoteMetricsOn(akka://akkaremotenull)] application.conf @ file:/Users/danbim/coding/akka-remote-null/target/scala-2.12/classes/application.conf: 19: Invalid value at 'akka.remote.log-frame-size-exceeding': No number in size-in-bytes value 'test'. For reference, check https://github.com/lightbend/config/blob/master/HOCON.md
```
* Check logFrameSizeExceeding against Int.MaxValue to allow JIT optimizations
* Load 'akka.remote.log-frame-size-exceeding' in RemoteSettings
Specifically:
* avoid "internal", as I initially though that meant the Akka framework's internal state of an actor
* dropped "started" in the context of recovering an actor: in order to recover you have to have been already started
* rather than refering to "changes", reference that what's persisted are the actor's received events
* some general English re-wording
* [ttk] Add access to logged events in BehaviorTestKit #25905
`BehaviorTestKit` now has methods to:
- Access to logged events
- Clear all log events
Added section in docs explaining how to check for logs.
Note about the implementation: `CapturedLogEvent` was effectively private to akka. It uses `OptionVal` internally, this makes it impossible to be used from outside akka. To overcome this, I added some methods to translate it to the corresponding `Option` and `Optional`.
* Apply feedback
Clean up `CapturedLogEvent` by using only `Option` in public methods
Use `immutable.Seq` instead of plain `Seq`
* !typ Change the ActorContext#ask in javadsl to accept a Duration instead of Timeout.
* !typ Change the ActorContext#setReceiveTimeout's parameter name from d to receiveTimeout.
* Replace TimerMsg hierarchy with a simple mix-in
* Fix a couple of typos
* Remove the need for a cast but just passing a log
* Remove the need for casts by making TimerInterceptor specify it handles Ts
* Prefer a sealed class to a sealed case class
* Tighten MatchError handling in fishForMessage
Avoid a whole bunch of other code being accidentally handled.
Also it allows for the inner 'loop' method to be @tailrec (next commit).
* Guarantee match exhaustion in fishForMessage
... by introducing FishingOutcome.ContinueOutcome to the type hierarchy.
* Simplify some timeout calculation in fishForMessage
'timeout' is always finite, as it's a `FiniteDuration`, and, even if it
weren't, the calculation is safe for non-finite durations.
* Make fishForMessage's inner loop @tailrec!
Apparently @tailrec and try/catch (with a re-throw in the catch) don't
mix well.
* Avoid double handing of timeouts in fishForMessage
If 'newTimeout' is sub-zero, just loop again which will trigger the
other throw.
* Make receiveOne return Option[M] rather than nullable M
Avoid future users from forgetting to consider the null case, which
happened in fishForMessage_internal.
* Switch to pattern matching Options
* Cast properly
Thanks, type inferencer, for inferring Nothing there! o_O
* Make fish's PartialFunction convenience explicit
* Update the scaladsl fishForMessage Scaladocs
* Restore MatchError catching logic & docs
TIL partial functions aren't of class PartialFunction anymore, they're
lambda classes.
* Tweak assertFail so it can be used more
* Avoid name shadowing
... on request. (I <3 name shadowing)
* Fix formatting
* Update issue templates
To perhaps make it clearer that https://discuss.akka.io is the place for questions?
* Remove top-level template in favour of multiple templates
* Remove unintentional hyphens, reword feature request template
Having it be AnyRef just makes it harder to use with a generic type,
because now instead of any type `T` it has to be a type `T <: AnyRef`.
There's no benefit in having it as AnyRef over Any.
This commit avoids memory being retained for groupBy. Prior to the commit, closedSubstreams could grow unbounded. This commit includes the size of closedSubstreams when considering to take on a new substream, while retaining the semantics described by its Flow API.