Commit graph

219 commits

Author SHA1 Message Date
dch
8df81e6b72 Introduce stable priority mailboxes.
Similar to existing priority mailboxes, but these preserve FIFO ordering
for messages of equal priority.
2015-01-28 11:20:59 +00:00
Patrik Nordwall
edd9c2d5c6 Merge pull request #16432 from pawel-wiejacha/pawelwiejacha_16431_named_test_probes
+tes #16431 support for TestProbe with user-defined name
2014-12-15 14:28:45 +01:00
Patrik Nordwall
c566d5a106 per #15423 Remove deprecated features from akka-persistence
* 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
2014-12-12 16:18:47 +01:00
Paweł Wiejacha
f480989b25 +tes #16431 support for TestProbe with user-defined name 2014-12-04 22:42:40 +01:00
Konrad 'ktoso' Malawski
73cd1d7375 +act #15163 allows to suppress certain messages from being dead-letter-ed
Conflicts:
	akka-actor/src/main/scala/akka/actor/ActorRef.scala
2014-12-01 17:03:13 +01:00
Marek Prochera
b43f3639d6 Fix #16364 - Doc - Persistent actor - clarification of the recovery customization 2014-11-25 23:13:16 +01:00
Balázs Kossovics
324dc0f0c5 =doc #16198 FSM extends Actor, not depends on it
The documentation incorrectly stated that FSM uses self type references
to depend on Actor, but it’s false, FSM directly extends Actor.
2014-11-03 23:43:50 +01:00
Marcus Ljungblad
dd8c920280 =doc #13043 Adding section on testing parent-child relationships 2014-10-31 15:43:20 +01:00
Ronak Buch
d6c7ac84d9 =doc fixed spelling mistake in comment 2014-10-17 04:33:38 -05:00
Patrik Nordwall
1ffd05db49 =act #13981 Encode name of Balancing dispatcher config path 2014-08-29 12:33:18 +02:00
Viktor Klang
cd8e97c060 +act - 15757 - Reworks implementation of ActorSystem shutdown
* 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
2014-08-25 15:49:28 +02:00
Krzysztof Janosz
1658f96862 +act #13004 Adding TailChopping router 2014-07-29 20:27:03 +02:00
Konrad Malawski
975e5d1455 Merge pull request #15541 from ktoso/port-doc-typed-router-ktoso
+doc #15537 add Typed router pattern (for validation)
2014-07-15 12:07:34 +02:00
Konrad 'ktoso' Malawski
ba2411833a +doc #15537 add Typed router pattern
Conflicts:
	akka-docs/rst/scala/code/docs/persistence/PersistenceDocSpec.scala
2014-07-15 10:22:23 +02:00
Konrad 'ktoso' Malawski
90bc347607 +per #13815 akka-persistence-tck based on @krasserm's work
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
2014-07-14 19:39:30 +02:00
Michal Knapik
7ca3a9699e +tes #12681 add EchoActor 2014-07-11 11:16:35 +02:00
Konrad Malawski
5cc9eb2a88 Merge pull request #15478 from kanerogers/patch-1
Add import for TestProbe
2014-07-07 15:48:56 +02:00
Pavel Zalunin
f730b60bd9 =doc,sam RecoveryCompleted handled by receiveRecover typo 2014-07-03 13:58:14 +03:00
Kane Rogers
e62610bbd7 Add import for TestProbe
The example for TestProbe doesn't seem to work very well without the TestProbe class imported. :-(
2014-07-02 12:55:48 +10:00
Patrik Nordwall
bc2aeaf0d3 =per #15441 Remove persistent stream in docs and sample
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
2014-06-28 17:24:25 +02:00
Patrik Nordwall
33c7f6bb4f !per Change for journal plugin compatibility
* 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
2014-06-28 17:11:06 +02:00
Patrik Nordwall
32ca608c97 +per #15327 Add AtLeastOnceDelivery trait
* also remove final of around methods, and let deliver send when not recoveryRunning

(cherry picked from commit 312b0d107a179accaf135f64ed9c3b78f3e351d1)
2014-06-26 22:58:46 +02:00
Konrad 'ktoso' Malawski
b1d1d87111 !per #15436 make persistenceId abstract in NEW classes
(cherry picked from commit de3249f7f4b859c3caa232e579d9a3bae7406803)

Conflicts:
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/PersistentActorExample.scala
2014-06-26 16:29:30 +02:00
Konrad 'ktoso' Malawski
3fd240384c +per #15424 Added PersistentView, deprecated View
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
2014-06-26 10:10:09 +02:00
Patrik Nordwall
d6ffdf521c =per #15429 Rewrite persistence documentation and samples for 2.3.4 changes
(cherry picked from commit 02351e32f110a8c4a249f0f3f84bae5898d1a836)

Conflicts:
	akka-samples/akka-sample-persistence-java-lambda/tutorial/index.html
	akka-samples/akka-sample-persistence-java/tutorial/index.html
	akka-samples/akka-sample-persistence-scala/build.sbt
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/ConversationRecoveryExample.scala
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/PersistentActorExample.scala
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/ProcessorChannelExample.scala
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/ProcessorChannelRemoteExample.scala
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/SnapshotExample.scala
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/StreamExample.scala
	akka-samples/akka-sample-persistence-scala/tutorial/index.html
2014-06-25 15:37:35 +02:00
Konrad 'ktoso' Malawski
4bb321a83a !per #15230 rename processorId => persistentId
* 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
2014-06-24 17:05:18 +02:00
Marcin Kubala
f4793a399f =act,clu,con,doc,per,rem,sam #15114 append missing parens at Actor.sender() invocations 2014-06-20 23:05:51 +02:00
Konrad 'ktoso' Malawski
a71790bb18 +per #15229 defer for PersistentActor
* 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
2014-06-10 17:09:24 +02:00
Björn Antonsson
9bcaeff87d +per #13944 Send RecoveryComplete message at end of recovery
Fixes #13944

Conflicts:
	akka-docs/rst/scala/code/docs/persistence/PersistenceDocSpec.scala
	akka-persistence/src/main/scala/akka/persistence/Processor.scala
	project/AkkaBuild.scala
2014-06-10 13:22:10 +02:00
Konrad 'ktoso' Malawski
d51b79c95a !per persistAsync
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
2014-06-10 11:09:12 +02:00
Konrad Malawski
c046cdff0a !act,doc #3893 Removed isTerminated checks from ActorClassification
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)
2014-04-24 14:08:07 +02:00
Patrik Nordwall
c1f7d7fa21 =doc #3924 Doc how to be notified when recovery completed 2014-03-25 10:46:05 +01:00
Roland Kuhn
dc305eaf18 +act #3949 add LoggingReceive.withLabel
def someState = LoggingReceive.withLabel("some state") {
  case msg => ...
}
2014-03-21 20:43:13 +01:00
Roland Kuhn
ac5f4fc72e Merge pull request #2050 from drexin/wip-3246-priority-mailbox-drexin
+act #3246 Added control aware mailbox types
2014-03-11 19:36:04 +01:00
Dario Rexin
c3950a7525 +act #3246 Added control aware mailbox types 2014-03-11 17:03:05 +01:00
dario.rexin
2cbad298d6 =all #3858 Make case classes final 2014-03-07 13:20:01 +01:00
Björn Antonsson
96be914979 Merge pull request #2052 from akka/wip-3900-systemActorOf-∂π
+act #3900 make systemActorOf available to Extensions
2014-03-04 13:32:12 +01:00
Roland Kuhn
b5eeb08fde +act #3900 make systemActorOf available to Extensions 2014-03-03 12:00:25 +01:00
Björn Antonsson
0dcb6d6654 !act,doc #3831 Adding more Java with Lambda documentation and support
* 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
2014-03-03 10:18:58 +01:00
Konrad Malawski
b7dd2a6af5 =doc #3886 improved example of PartialFunction.orElse composition
Changed orElse composition example to better highlight it's
possibilities. This is a follow up PR based on a discussion on
akka-user: https://groups.google.com/forum/#!topic/akka-user/vVUZPMeJmzw
2014-02-20 09:19:04 +00:00
Patrik Nordwall
57d831716a Merge pull request #2004 from akka/wip-3868-doc-remote-router-group-patriknw
=doc #3868 Clarify remote router group
2014-02-13 12:46:17 +01:00
Patrik Nordwall
cafa6585ce =doc #3868 Clarify remote router group 2014-02-13 12:45:42 +01:00
Patrik Nordwall
a247365b57 !act,doc #2922 Doc event bus and fix Java API 2014-02-13 12:23:51 +01:00
Patrik Nordwall
f1edf78979 Merge pull request #1980 from vossad01/wip-3838-SetCopyrightYear2014-vossad01
Update Copyright to 2014, see #3838
2014-02-06 11:14:38 +01:00
Adam Voss
cce29dfa51 Changes all occurances of Typesafe copyright to extend to 2014. 2014-02-04 21:20:09 -06:00
Patrik Nordwall
5650998ede Merge pull request #1967 from dhobi/master
=doc Explaining how to deal with Exceptions in TypedActor
2014-02-03 02:44:41 -08:00
Björn Antonsson
179faba453 =all #3837 Make akkaScalaNightly compile on scala 2.11.0-M8 2014-01-31 14:13:02 +01:00
Daniel Hobi
c63586730c =doc Explaining how to deal with Exceptions in TypedActor 2014-01-24 16:16:35 +01:00
Patrik Nordwall
d0f9c8f2fc Merge pull request #1953 from akka/wip-3102-remove-ComposableActor-patriknw
=doc #3102 Remove ComposableActor doc sample
2014-01-22 07:32:11 -08:00
Patrik Nordwall
7bae3082aa =doc #3102 Remove ComposableActor doc sample 2014-01-22 09:18:20 +01:00