- Moved `CircuitBreakerInternalEvents` inside `CircuitBreakerProxy` companion object,
- changed logs messages to be consistent with the state name case,
- used the correct log level for the case of unexpected self-sending of `CircuitOpenFailure`
- Converted the `OpenCircuitException` class into an object implementing the sealed class `OpenCircuitException`
- `CircuitBreakerAwareFuture` is a final class
- Using Given-When-Then consistently across all tests (can remove them all if we prefer to keep consistency with the rest of the project)
- Using Given-When-Then consistently across all tests (can remove them all if we prefer to keep consistency with the rest of the project)
- Refactored the part associated to the `failForOpenCircuit` extension to Future was done.
- Moved implicit conversion into a specific class. Not requiring anymore the `._` import but importing only the implicit conversion needed
- Added a `askWithCircuitBreaker` approach to replace the ask and the following `failForOpenCircuit`
- Compacted all samples in the same file and added the copyright header
- Improved documentation
- Added handling of termination of target actor
- Introduced a Passthrough command type to allow sending message to the target actor in any state. It is intended for control messages such as `PoisonPill` or `Kill`
- Renamed the circuit breaker actor into a proxy for clarity and small renaming of the builder
- Added Java-friendly `with` copy methods to `CircuitBreakerPropsBuilder`
- Refactored a test not using the scenario trait as others
- Added reference to the circuit breaker pattern function in the CircuitBreakerActor scaladoc
- made `final` classes `OpenCircuitException` and `CircuitBreakerActor`
- Renamed `CircuitBreakerActorBuilder` into `CircuitBreakerActorPropsBuilder` and renamed the `propsForTarget` method into `props`
* addunidoc task via an AutoPlugin that depends on PrValidation and Unidoc autoplugins
* separate cli option logic to a case class
* remove autoplugin for root project
Two issues:
1) ShardRegion actor must stop itself when the node is shutting down,
ie. when receiving MemberRemoved(selfAddress)
2) ShardCoordinator must not persist anything when the node is shutting
down. MemberRemoved of other shard regions will trigger Terminated,
which must not be persisted, because then the next coordinator will
replay those events and end up in wrong state. This is a problem
announced itself when using leaving as illustrated in the new test.
To solve the second issue I have added a new ClusterShuttingDown event
that is published before the MemberRemoved events. Note that Terminated
is triggered by MemberRemoved.
(cherry picked from commit 1b272c72597beece9d93f0054f4b58e3d25f9ae2)