* Config to exclude class prefix from serialize-messages, #24273
* Adding no-serialization-verification-needed-class-prefix, with "akka." included
by default
* This is important now when we disable Java serialization by default.
There will be many complaints about Akka internal classes that are not marked with
NoSerializationVerificationNeeded, and we can't really sprinkle that everywhere.
* Not removing NoSerializationVerificationNeeded usage in Akka classes because that
may break bin compat, even though it's needed any more.
* fix DisabledJavaSerializerWarningSpec
Move utils to construct PersistenceId
* Move from EntityTypeKey to PersistenceId
* Thereby no persistence dependencies in sharding
* Reference documentation PersistenceId and how to use with Sharding
* Add EntityTypeKey to EntityContext to make it "complete"
* One consequence of adding EntityTypeKey to EntityContext is that
now requires additional message type parameter and then type inference
for `init` (Entity) breaks down. Solved by using two parameter lists in
Entity.apply, which is pretty nice anyway since the second parameter is
a function.
* as bonus the dependency can be removed
* Reference docs for SL4J logging in Typed, #27648
* mention package implicit for LoggerOps
* reference docs of log testing utilities
* cleanup classic logging.md
* most of it is still relevant, and different enough from
typed/logging.md to keep it separate
* use ThresholdFilter instead of LevelFilter
Co-Authored-By: Will Sargent <will.sargent@gmail.com>
* TestAppender interaction with LoggingEventFilter
* TestAppender plays the same role as classic TestEventList
* replace Sl4jLoggingEvent.java
* include MDC in testkit.LoggingEvent to allow for custom filter
testing MDC
* fix tests
* fix log events in BehaviorSetKit, using SubstituteLogger
* MDC in EventSourcedBehavior
* using raw MDC to set the persistenceId and persistencePhase fields
* avoid access to MDC ThreadLocal if log isn't used
* Automatically enable eventStream Slf4jLogger for Typed (PR #27583)
* amend the ActorSystem config on startup when config akka.use-slf4j=on
and akka-slf4j in classpath
* akka.use-slf4j is defined in akka-actor-typed reference.conf
* also enable the Slf4jLoggingFilter automatically
* remove config in tests
* Include actor path as akkaSource in MDC (PR #27587)
* move logger init to ActorContextImpl since not specific to untyped (ActorContextAdapter)
* careful to not access MDC ThreadLocal if logging isn't used (per message)
* MDC is cleared (if used) from aroundReceive in ActorAdapter after processing each message
* also changed MDC for EventSourcedBehavior to rely on context.log and the outer MDC.clear()
* just removing the MDC values is not enough because the empty Map remains in the ThreadLocal
* Optimization of MDC interceptor (PR #27610)
* Extension methods to Logger as workaround for overload and varargs problem (PR #27605)
* "ambiguous reference to overloaded definition" for 2 arg method
* varargs not supported for primitive types
* providing extension methods info2 and infoN (and friends) via implicit class LoggerOps
as more convenient workaround for these problems
* New API for Typed LoggingEventFilter (PR #27611)
* builder style
* will make it easier to add more conditions
* all conditions are AND:ed together which makes it easier to define custom filters
* simplifies the implementation as a bonus
* javadsl
* use new api in all tests
* leeway setting
* verify that occurrences = 0 works
* use javadsl in two tests
* change interceptLogger, and some other feedback
* Testing utility to silence logging until failure (PR #27588)
* Logback appender that captures all log events and can flush them
later to other appenders
* LogCapturing mixin for ScalaTest that flush the captured logging events
when a test fails. Also clears the captured events after all tests.
* Configuration in logback-test.xml
* log capturing for JUnit tests too, using TestRule
* Silence initial setup logging from Logback
* make LogCapturing public
* use LogCapturing in all tests
* aside from multi-jvm, and a few extending AkkaSpec, so far
* a few doc tests needed debug level
* mention in migration guide
* rename setLoggerClass to setLoggerName
* check for logback dependency to give nicer error message
* fix filterKeys, deprecated in 2.13
* Untyped to classic naming convention #24717
* Added entry of naming convention change to migration docs.
* Rename `toUntyped` to `toClassic` in adapters
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
from akka-remote to akka-actor since they had no dependency
and are useful also in local systems, e.g. persistence.
* e.g. needed for persistence-tck
* less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
but misconfigured
* Made tests pass
* allow-java-serialization=on in akka-persistence
* allow-java-serialization=on in classic remoting tests
* JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
* Boolean
* java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
* Effect() is factory in EventSourcedBehavior class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
* fallback to akka.remote.serialization.ThrowableNotSerializableException
if exception is not serializable when wrapped in system messages from
remote deployed child actors and Status.Failure messages
* it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
improving or removing that feature
* migration guide, including description of rolling update
* fix 2.13 compiler error
* minor review feedback
* Log Dropped from DeadLetterListener, #26432
* Move Dropped from akka-actor-typed to akka-actor
* Use it in Artery
* Use in right way from GroupRouter, not via deadLetters
* Remove "without sender" in log message from DeadLetterListener,
since there is no sender in Typed
* mima filter
* add sender to Dropped
* Always be explicit about what message types an interceptor can handle, to avoid
ClassCastException if another message type is passing. That may happen when
the inner behavior understands other messages than it says in it's declared
behavior type by using narrow. EventSourcedBehaviorImpl is an example.
* Minimized failing tests
* Supervision interceptor is of type Any since failures of all messages must be
handled
* Changed PoisonPillInterceptor to only intercept signals
* rename type params to Outer and Inner
* separate BehaviorSignalInterceptor
* which only intercepts signals and messages bypass, e.g. PoisonPillInterceptor
* also made aroundSignal optional to override in BehaviorInterceptor
* Add test for interceptors combined with EventSourcedBehavior
* ClassTag not needed for LogMessagesInterceptor
* since it can handle Any
* test supervision of different message type
* clarify low level
* docs for interceptMessageClass param and ClassTag
* remove O type parameter in supervision
* remove extra setup for RestartSupervisor, already factory
* mention in migration guide
* move AccountExample to Sharding, to be able to test with EntityRef etc
* add tests for AccountExample
* for javadsl there is a problem
* explicity replyTo type solves javadsl issue
* use EventSourcedEntity.withEnforcedReplies
* try replyTo with super type AccountCommandReply
* Reply <: AccountCommandReply
* replace lambda with method (constructor) reference
* Removed `Behavior.same`, `Behavior.unhandled`, `Behavior.stopped`, `Behavior.empty`, and `Behavior.ignore` since
they were redundant with corresponding in Behaviors
* Also moved several of the internal things from Behavior to BehaviorImpl
* previous `schedule` method is trying to maintain a fixed average frequency
over time, but that can result in undesired bursts of scheduled tasks after a long
GC or if the JVM process has been suspended, same with all other periodic
scheduled message sending via various Timer APIs
* most of the time "fixed delay" is more desirable
* we can't just change because it's too big behavioral change and some might
depend on previous behavior
* deprecate the old `schedule` and introduce new `scheduleWithFixedDelay`
and `scheduleAtFixedRate`, when fixing the deprecation warning users should
make a concious decision of which behavior to use (scheduleWithFixedDelay in
most cases)
* Streams
* SchedulerSpec
* test both fixed delay and fixed rate
* TimerSpec
* FSM and PersistentFSM
* mima
* runnable as second parameter list, also in typed.Scheduler
* IllegalStateException vs SchedulerException
* deprecated annotations
* api and reference docs, all places
* migration guide
Note that it will become fully stable in 2.6.0 so this doesn't mean that there will be no more API changes.
* Remove from event sourced behavior
* Remove api may change settings from typed modules
* Dont check mima for typed until 2.6
* migration guide entry
* ManualTime was making assumptions about scheduler
* Add API compile tests for good measure
* named scheduleAtFixedRate instead of schedule
* allow combining snapshotWhen and RetentionCriteria
* RetentionCritieria unit test
* move retention and snapshot tests to separate EventSourcedBehaviorRetentionSpec
* because EventSourcedBehaviorSpec is testing too many different things
* Update Scaldoc and reference documentation
* moved it to the snapshotting page
* Effect.persist(event).thenUnstashAll().thenRun(..) can be misinterpreted
as the callback of thenRun is invoked when all unstashing has been completed,
while it is actually running the callback first and the the unstashing process
follows.
* Unstashing is a process where stashed commands are processed one-by-one
and waiting for persist effects to complete before processing next.
* Even if we would come up with a way to keep pending callbacks around during
the unstashing it would probably be complicated for user to reason about it.
Suddenly a callback is executed from an old command although several other
commands (that were stashed/unstashed) have been processed inbetween.
* This change makes the unstashAll Effect terminal, meaning that additional
effects like thenRun can't be added after unstashAll.
* ReplyEffect is also terminal, which makes sense since it's supposed to be
returned effect. It must still be possible to combine with thenUnstashAll,
thenReply.thenUnstashAll.
* include state in EventSourcedBehavior.receiveSignal, #26574
* because state type can't be inferred in RecoveryCompleted
* and probably useful to always have access to the state for the signals
* PartialFunction with (state,signal) tuple
* improve how to handle exceptions from signals