Commit graph

344 commits

Author SHA1 Message Date
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
07e67b90ea !per #15428 Deprecate deleteMessage
(cherry picked from commit 4973d0b37d635a0a2c9a94c2898da988e4f14fc7)
2014-06-28 15:59:33 +02:00
Patrik Nordwall
018e0c33b5 Merge pull request #15465 from akka/wip-15284-throws-annotation-master-patriknw
+act #15284 Add throws TimeoutException to Inbox.receive
2014-06-27 14:56:23 +02:00
Patrik Nordwall
3a94510869 +act #15284 Add throws TimeoutException to Inbox.receive
(cherry picked from commit ab19cc8a527f1a01a8180c2b199affcb47e5b1d2)
2014-06-27 12:29:11 +02:00
Patrik Nordwall
4e645bde23 =doc #13965 Fix wrong code sample for BalancingPool
(cherry picked from commit 24ce0605ac954d516a52d9ce14624414c1c79933)
2014-06-27 12:22:16 +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
Martin Krasser
062d304b73 +per,+str #15035 Reactive-stream producers for persistent messages written by akka-persistence processors
(cherry picked from commit 5dc62400e4f2f9d7afe5efe93fc8bef5b9d226c0)

Conflicts:
	akka-docs/rst/scala/code/docs/persistence/PersistenceDocSpec.scala
	project/AkkaBuild.scala
2014-06-25 15:07:50 +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
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
Konrad Malawski
3421a966d6 Merge pull request #2125 from ktoso/3982-doc-clarify-eventstream-is-local-ktoso
=doc #3982 Clarify that EventStream is local only
2014-04-14 09:57:12 +02:00
Konrad Malawski
df90cc3a2e =doc #3982 Clarify that EventStream is local only
Devs were confused a few times on the mailing list if the eventstream
publishes to the cluster or not; Suggesting pub-sub if needed in clustered env.
2014-04-14 09:56:19 +02:00
Konrad Malawski
2173a037cb Merge pull request #2126 from ktoso/3986-cluster-singleton-may-become-doubleton-during-splits-ktoso
=doc #3986 Cluster Singleton should not be used with AutoDown
2014-04-10 15:39:31 +02:00
Konrad Malawski
08fd4c93fa =doc #3986 Cluster Singleton should not be used with AutoDown
unless you want each partition of the cluster (effectively new clusters),
to spin up their "own" singleton.
2014-04-10 15:38:22 +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
4ba1bc46fb Merge pull request #2096 from akka/wip-forward-docs-∂π
=doc #3917 include all reference.conf
2014-03-24 12:03:10 +01:00
Roland Kuhn
d6b33d15a8 add links to reference.conf to docs 2014-03-24 12:02:47 +01:00
Björn Antonsson
723c931d16 +act,sam,doc #3940 Added receive setter for Java Lambda actors
* Added a setter for Java lambda actors to "hide" the not so nice looking type signature of the "receive" method.
* Updated docs to reflect the changes.
* Converted samples to use the new setter.
2014-03-22 10:53:54 +01:00
Björn Antonsson
26c493ea4a =per #3915 Make become work during recovery for EventsourcedProcessor et.c. 2014-03-22 00:47:03 +01:00
Björn Antonsson
4b57392143 Merge pull request #2076 from akka/wip-3911-forward-port-ban
(Forward Port) +act #3911 Adding Java Lambda compatibility for Supervisor Strategy
2014-03-17 22:14:33 +01:00
Björn Antonsson
ba7247b240 +act #3911 Adding Java Lambda compatibility for Supervisor Strategy
Conflicts:
	akka-actor/src/main/scala/akka/util/Timeout.scala
2014-03-17 15:04:29 +01:00
Patrik Nordwall
3a9725f538 Merge pull request #2070 from akka/wip-3843-singleton-proxy-sample-patriknw
=sam #3843 Use ClusterSingletonProxy in cluster samples
2014-03-17 14:58:18 +01:00
Roland Kuhn
95d27e3f82 Merge pull request #2067 from akka/wip-WhatIsAkka-∂π
=doc clean up what-is-akka.rst and switch to www.typesafe.com
2014-03-17 14:16:47 +01:00
Patrik Nordwall
ad18405877 =sam #3843 Use ClusterSingletonProxy in cluster samples 2014-03-14 16:32:59 +01:00
Patrik Nordwall
7d40ca1840 !act #3920 Remove UntypedActorFactory 2014-03-14 14:15:49 +01:00
Roland Kuhn
98c282f115 =doc clean up what-is-akka.rst and switch to www.typesafe.com
the latter is necessary because of broken DNS requirements which make
apex domains brittle (since they must resolve to an A record with a
single IP)
2014-03-13 12:42:47 +01:00
Dario Rexin
c3950a7525 +act #3246 Added control aware mailbox types 2014-03-11 17:03:05 +01:00
Patrik Nordwall
dfef14a590 Merge pull request #2014 from trobert/master
Add the ability to use an external camel context
2014-03-06 13:16:53 +01:00
Björn Antonsson
07e361c684 !act,sam #3889 Adding Activator template FSM/become for Java with Lambda support
* Dining Hakkers Activator template for FSM and become
* Cleaup of FSM event matchers to be more usable and consistent
2014-03-05 11:16:23 +01:00
Björn Antonsson
6af33381b3 Merge pull request #2057 from akka/wip-docs-2.3.0-∂π
Wip docs 2.3.0 ∂π
2014-03-05 11:13:57 +01:00
Roland Kuhn
9ed3c633c5 =doc #3905 describe symmetric remoting requirement 2014-03-04 17:38:27 +01:00
Roland Kuhn
8a0a6d9e13 +per #3906 use AbstractActor for Java8 Persistence
- also rename and link doc chapter
2014-03-04 16:15:13 +01:00
Nabeel Ali Memon
a0a541eda7 +per #3906 add Java8 support for Persistence
- Provided new interfaces for akka-persistence to be usable directly
  through ReceiveBuilder/PartialFunction. Added a sample java project to
  showcase the usage of these API's with akka-persistence.
- Fixed a minor comment block in javadoc code snippet.
- Renamed java event persistor and fixed a documentation typo.
- Put back java event persistence methods in
  UntypedEventsourcedProcessor and copied them into
  AbstractEventsourcedProcessor for the sake of clarity in javadocs.
  Also corrected some doc punctuations.
- Documentation for akka-persistence java 8 lambda expressions support.
- Moved code examples referred from within lambda-persistence.rst to
  java8 compatible sample project.
- Removed remaining unwanted java8 compatible source files.
2014-03-04 16:14:57 +01:00
Björn Antonsson
35f2f215f6 Merge pull request #2040 from akka/wip-persistent-delivery-path-∂π
=doc document why Deliver takes an ActorPath
2014-03-04 13:44:00 +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
Roland Kuhn
6cb4ed381d =doc document why Deliver takes an ActorPath 2014-02-27 15:04:38 +01:00
Martin Krasser
dc3164d1b1 =doc #3883 Eventsourced to Akka Persistence comparison/migration 2014-02-27 07:54:13 +01:00
Patrik Nordwall
d1a7956d17 =doc Links to activator and some doc improvements 2014-02-21 11:24:01 +01:00
Thibaut Robert
c71987f4a7 +cam #3885 Add the ability to use an external camel context 2014-02-20 14:18:54 +01:00
Patrik Nordwall
48afb23586 =doc #3881 Change link to persistence community plugins 2014-02-20 11:47:43 +01:00
Eugene Platonov
b1d794e9af =tes,act,doc Make dilated an extension method and deprecate TestKit.dilated in favor of JavaTestKit.dilated 2014-02-14 18:35:51 -05:00
Martin Krasser
cf6e61e45a =per #3774 Persistence activator templates 2014-02-13 13:41:21 +01: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
aad21fe69e Merge pull request #2000 from akka/wip-3685-faq-patriknw
=doc #3685 Add FAQ to documentation
2014-02-13 12:35:52 +01:00