* deprecates awaitTermination, shutdown and isTerminated
* introduces a terminate-method that returns a Future[Unit]
* introduces a whenTerminated-method that returns a Future[Unit]
* simplifies the implementation by removing blocking constructs
* adds tests for terminate() and whenTerminated
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
We must first release akka-stream with dependency to akka 2.3.4
and it should be maintained in the akka-release-dev branch
(cherry picked from commit a97a067701cfc527b235707882e72326277415f3)
Conflicts:
akka-samples/akka-sample-persistence-scala/build.sbt
akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/StreamExample.scala
* A few more adjustments, found when verifying source compatibility of a few
journal plugins
* Note that PersistentId will be removed with deleteMessage and we should
not break plugins because of that
* Add missing section of at-least-once delivery in migration guide
(cherry picked from commit 6727eac6d07280d277968e2e25db44e02be3b102)
Conflicts:
akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
akka-persistence/src/main/scala/akka/persistence/Persistent.scala
akka-persistence/src/main/scala/akka/persistence/Snapshot.scala
akka-persistence/src/main/scala/akka/persistence/journal/AsyncWriteProxy.scala
* also remove final of around methods, and let deliver send when not recoveryRunning
(cherry picked from commit 312b0d107a179accaf135f64ed9c3b78f3e351d1)
A PersistentView works the same way as View did previously, except:
* it requires an `peristenceId` (no default is provided)
* messages given to `receive` are NOT wrapped in Persistent()
akka-streams not touched, will update them afterwards on different branch
Also solves #15436 by making persistentId in PersistentView abstract.
(cherry picked from commit dcafaf788236fe6d018388dd55d5bf9650ded696)
Conflicts:
akka-docs/rst/java/lambda-persistence.rst
akka-docs/rst/java/persistence.rst
akka-docs/rst/scala/persistence.rst
akka-persistence/src/main/scala/akka/persistence/Persistent.scala
akka-persistence/src/main/scala/akka/persistence/View.scala
* This is NOT binary compatible, we're in an *experimental* module.
* disabled binary compat checks for package akka.persistence
* Source compatibility is retained, but users should migrate do the new
method name ASAP.
* Plugin APIs were migrated in a way that allows the old plugins to
compile agains 2.3.4 without having to change anything. Hopefuly this
will help authors migrate to 2.3.4 sooner. This is only source level compatible, not binary compatible.
* added deprecation warnings on all processorId methods and provided bridges where possible
* for users, the migration should be painless, they can still override
the old method, and it'll work. But we encourage them to move to
persistenceId; All delegation code will have to be removed afterwards ofc.
Conflicts:
akka-persistence/src/main/scala/akka/persistence/Channel.scala
akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
akka-persistence/src/main/scala/akka/persistence/Persistent.scala
akka-persistence/src/main/scala/akka/persistence/PersistentChannel.scala
akka-persistence/src/main/scala/akka/persistence/Processor.scala
akka-persistence/src/main/scala/akka/persistence/Snapshot.scala
akka-persistence/src/main/scala/akka/persistence/journal/AsyncWriteProxy.scala
akka-persistence/src/main/scala/akka/persistence/journal/inmem/InmemJournal.scala
akka-persistence/src/main/scala/akka/persistence/journal/leveldb/LeveldbKey.scala
akka-persistence/src/main/scala/akka/persistence/snapshot/SnapshotStore.scala
akka-persistence/src/test/scala/akka/persistence/serialization/SerializerSpec.scala
project/AkkaBuild.scala
* Deferred events are not persisted, thus will not participate in replays
etc. If users want events to be persisted, they can simply use
`persistAsync` instead.
* This, 3rd, rewrite extends the Persistent hierarchy by a top level
trait "Resequenceable", which is used to mark every event to be sent
in sequence back to the PersistentActor. These are split into
NonPersistentRepr or PersistentRepr, and acted upon accordingly.
* defer is guaranteed to be called, even after persistence failures
* Includes docs updates for java/scala/java8
Resolves#15229
Depends on #15227
Conflicts:
akka-docs/rst/scala/code/docs/persistence/PersistenceDocSpec.scala
akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
akka-persistence/src/main/scala/akka/persistence/Processor.scala
akka-persistence/src/test/scala/akka/persistence/PersistentActorSpec.scala
project/AkkaBuild.scala
Breaks binary compatibility because adding new methods to Eventsourced
trait. Since akka-persistence is experimental this is ok, yet
source-level compatibility has been perserved thankfuly :-)
Deprecates:
* Rename of EventsourcedProcessor -> PersistentActor
* Processor -> suggest using PersistentActor
* Migration guide for akka-persistence is separate, as wel'll deprecate in minor versions (its experimental)
* Persistent as well as ConfirmablePersistent - since Processor, their
main user will be removed soon.
Other changes:
* persistAsync works as expected when mixed with persist
* A counter must be kept for pending stashing invocations
* Uses only 1 shared list buffer for persit / persistAsync
* Includes small benchmark
* Docs also include info about not using Persistent() wrapper
* uses java LinkedList, for best performance of append / head on
persistInvocations; the get(0) is safe, because these msgs only
come in response to persistInvocations
* Renamed internal *MessagesSuccess/Failure messages because we kept
small mistakes seeing the class "with s" and "without s" as the same
* Updated everything that refered to EventsourcedProcessor to
PersistentActor, including samples
Refs #15227
Conflicts:
akka-docs/rst/project/migration-guides.rst
akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
akka-persistence/src/main/scala/akka/persistence/Persistent.scala
akka-persistence/src/test/scala/akka/persistence/PersistentActorSpec.scala
project/AkkaBuild.scala
Instead of isTerminated we now use death watch on subscribers.
! Breaking change - ActorClassification based event buses now require
and actor system. Previously no actors were involved, but now someone
has to `watch` the subscribers. The unsubscriber is an system actor,
and won't be stopped automagically if a bus stops to be used (hard to
determine what "stops being used" is)
* Replaced isTerminated checks with watching actors
* backing structure for ActorClassification swaped from
ConcurrentHashMap to immutable.Map with CAS operations on it. This is
required to avoid races and guarantee register/unregister ordering
(messages sent with proper sequence numbers) to the unsubscriber.
Performance tested it and still above 1.3million subscribe+unsubscribe
ops per second (mac i7, retina), where as the CHM version was
4 million - but that one could only work in the presence of
itTerminated - so we pay the price here for removing it.
* `ActorClassification` starts the unsubscriber instance by itself,
the unsubscriber is an system actor, and can be stopped via
`ActorClassification#shutdown`
* Will unregister from unsubscriber, when no more subscriptions for
given subscriber are left in this bus.
* Added missing "Java API: " for some types
* Updated docs to point out the automatic subscriber purging (on terminated)
* The Java with Lambda support documentation for AbstractActor and AbstractFSM are now on par with Scala
* Many small fixes and additions of missing things
* Added an AbstractActorContext that has convenience functions for getChild and getChildren
* because it is not referentially transparent; normally we reserved parens for
side-effecting code but given how people thoughtlessly close over it we revised
that that decision for sender
* caller can still omit parens