* The ThreadLocal Serialization.currentTransportInformation is used for serializing local
actor refs, but it's also useful when a serializer library e.g. custom serializer/deserializer
in Jackson need access to the current ActorSystem.
* We set this in a rather ad-hoc way from remoting and in some persistence plugins, but it's only
set for serialization and not deserialization, and it's easy for Persistence plugins or other
libraries to forget this when using Akka serialization directly.
* This change is automatically setting the info when using the ordinary serialize and deserialize
methods.
* It's also set when LocalActorRefProvider, which wasn't always the case previously.
* Keep a cached instance of Serialization.Information in the provider to avoid
creating new instances all the time.
* Added optional Persistence TCK tests to verify that the plugin is setting this
if it's using some custom calls to the serializer.
* added tests
* docs about highestSeqenceNr behaviour after message deletion
* clarification about highestSequenceNr in AsyncRecovery#asyncReadHighestSequenceNr and AsyncWriteJournal#asyncDeleteMessagesTo
It was actually used for finding the right metadata, but the local store
deleted all files with matching seqNr.
Note that we use 0L as undefined value for the timestamp when deleting
single snapshot (and therefore it makes sense to delete all in that case)
* we need to read the higestSeqNr anyway and it is better
to do it first and limit the asyncReadHighestSequenceNr
to that (instead of Long.MaxValue)
* return the highestSeqNr in the ReplayMessagesSuccess
* this also removes one become state in PersistentActor recovery
logic
* changing Plugin API for asyncWriteMessages and writeMessages
* passing explicit AtomicWrite that represents the events of
persistAll, or a single event from persist
* journal may reject events before storing them, and that
will result in onPersistRejected (logging) and continue in the
persistent actor
* clarified the semantics with regards to batches and atomic writes,
and failures and rejections in the api docs of asyncWriteMessages
and writeMessages
* adjust the Java plugin API, asyncReplayMessages, doLoadAsync
+ per plugin scoped adapters
+ could be swapped during runtime
+per EventAdapter now has manifest and is configurable ai la serializers
+ json examples in docs
+ including "completely manual" example in case one wants to add
metadata TO the persisted event
+ better error reporting when misconfigured bindings
+ manifest is handled by in memory plugin
- did not check if it works with LevelDB plugin yet
> TODO: json example uses Gson, as that's simplest to do, can we use
+per allows 1:n adapters, multiple adapters can be bound to 1 class
* I think it originated from channels, or some idea that
the sender should be revived (as good as possible) during replay,
but that is pretty useless
* It must still be in PersistentRepr for remote serialization
* I didn't want to change to the built in sender when looping to the
journal because keeping it together with the message makes it easier
to do batching (queueing)
* adjust tck
* in the end TestKitBase eagerly initialize the ActorSystem and
to avoid the need for using lazy val tricks I changed the trait
to abstract class with config constructor parameter
* remove channels
* remove View
* remove Processor
* collapse the complicated internal state management
that was spread out between Processor, Eventsourced and Recovery
* remove Recovery trait, this caused some duplication between Eventsourced
and PersistentView, but but the enhanced PersistentView will not be based
on recovery infrastructure, and therefore PersistentView code will be replaced anyway
* remove PersistentBatch
* remove LoopMessage
* remove deleteMessages of individual messages
* remove Persistent, PersistentRepr and PersistentImpl are kept
* remove processorId
* update doc sample code
* note in migration guide about persistenceId
* rename Resequencable to PersistentEnvelope
Original here: https://github.com/krasserm/akka-persistence-testkit
New features:
* merged martin's tests
* usable from java (junit 4)
* simple bench test, which helps checking if ordering is perserved under
bigger workloads and simple perf checking
* does NOT include tests for already deprecated features (deleteMessages)
* docs
Resolves#13815
Conflicts:
project/AkkaBuild.scala