Skip to content

Commit b83eb4b

Browse files
committed
moved back from monolithic repo to its own repo, is way better
1 parent 28991f9 commit b83eb4b

25 files changed

+431
-215
lines changed

README.md

+70-79
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/2cedef156eaf441fbe867becfc5fcb24)](https://www.codacy.com/app/dnvriend/akka-persistence-inmemory?utm_source=github.com&utm_medium=referral&utm_content=dnvriend/akka-persistence-inmemory&utm_campaign=Badge_Grade)
77
[![License](http://img.shields.io/:license-Apache%202-red.svg)](http://www.apache.org/licenses/LICENSE-2.0.txt)
88

9-
Akka-persistence-inmemory is a plugin for akka-persistence that stores journal and snapshot messages memory, which is very useful when testing persistent actors, persistent FSM and akka cluster.
9+
[akka-persistence-inmemory](https://github.com/dnvriend/akka-persistence-inmemory) is a plugin for akka-persistence that stores journal and snapshot messages memory, which is very useful when testing persistent actors, persistent FSM and akka cluster.
1010

1111
## Installation
1212
Add the following to your `build.sbt`:
@@ -15,7 +15,7 @@ Add the following to your `build.sbt`:
1515
// the library is available in Bintray's JCenter
1616
resolvers += Resolver.jcenterRepo
1717

18-
libraryDependencies += "com.github.dnvriend" %% "akka-persistence-inmemory" % "1.3.14"
18+
libraryDependencies += "com.github.dnvriend" %% "akka-persistence-inmemory" % "1.3.17"
1919
```
2020

2121
## Contribution policy
@@ -25,23 +25,22 @@ Contributions via GitHub pull requests are gladly accepted from their original a
2525

2626
This code is open source software licensed under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0.html).
2727

28-
# Configuration
28+
## Configuration
2929
Add the following to the application.conf:
3030

31-
```
31+
```scala
3232
akka {
3333
persistence {
3434
journal.plugin = "inmemory-journal"
3535
snapshot-store.plugin = "inmemory-snapshot-store"
3636
}
3737
}
38-
```
38+
```
3939

40-
# Configuring the query API
40+
## Configuring the query API
4141
The query API can be configured by overriding the defaults by placing the following in application.conf:
4242

4343
```
44-
# Optional
4544
inmemory-read-journal {
4645
# Absolute path to the write journal plugin configuration section to get the event adapters from
4746
write-plugin = "inmemory-journal"
@@ -291,49 +290,41 @@ The returned event stream contains only events that correspond to the given tag,
291290
The same stream elements (in same order) are returned for multiple executions of the same query. Deleted events are not deleted
292291
from the tagged event stream.
293292

294-
# Some videos about Akka Persistence, streams and Event Sourcing
295-
Is Event Sourcing getting traction? I would say so:
296-
297-
- [Konrad Malawski - Akka Streams & Reactive Streams in action (2016)](https://www.youtube.com/watch?v=x62K4ObBtw4)
298-
- [Björn Antonsson & Konrad Malawski - Resilient Applications with Akka Persistence (2016)](https://www.youtube.com/watch?v=qqNsGomfabc)
299-
- [Aleksei Irbe - Akka persistence (2016)](https://www.youtube.com/watch?v=Oc9lHVVn1YQ)
300-
- [Greg Young - Event Sourcing is actually just functional code (2016)](https://www.youtube.com/watch?v=kZL41SMXWdM)
301-
- [Greg Young — A Decade of DDD, CQRS, Event Sourcing (2016)](https://www.youtube.com/watch?v=LDW0QWie21s)
302-
- [Packt - Introduction to Akka Persistence (2016)](https://www.youtube.com/watch?v=QwsA8hkNGOA)
303-
- [Paweł Szulc - Event Sourcing & Functional Programming - a pair made in heaven (2016)](https://www.youtube.com/watch?v=1rFY2SfdDoE)
304-
- [Konrad Malawski - Akka and the Zen of Reactive System Design (2016)](https://www.youtube.com/watch?v=Mg5ZmoMddJI)
305-
- [Renato Cavalcanti - Field guide to DDD/CQRS using the Scala Type System and Akka (2015)](https://www.youtube.com/watch?v=fQkKu4tTgCE)
306-
- [Martin Zapletal: Data in Motion - Streaming Static Data Efficiently in Akka Persistence (2016)](https://www.youtube.com/watch?v=K4FY0XKediU)
307-
- [Martin Krasser - Event Sourcing and CQRS with Akka Persistence and Eventuate (2015)](https://www.youtube.com/watch?v=vFVry457XLk)
308-
- [Duncan DeVore - CQRS/ES with Scala and Akka Persistence (2015)](https://www.youtube.com/watch?v=uA2AsZW0I7A)
309-
- [Sander Mak - Event-Sourced Architectures with Akka (2015)](https://www.youtube.com/watch?v=gvsRl6xZiiE)
310-
- [Sidharth Khattri - Akka Persistence | Event Sourcing (2015)](https://www.youtube.com/watch?v=yAI71_smS34)
311-
- [Michał Płachta - Building multiplayer game using Reactive Streams](https://www.youtube.com/watch?v=iKTFalVfoSU)
312-
- [Patrik Nordwall - Intro to Akka persistence (2014)](https://www.youtube.com/watch?v=r5lecCBazvE)
313-
- [Greg Young - Event Sourcing(2014)](https://www.youtube.com/watch?v=8JKjvY4etTY)
314-
315-
# What's new?
316-
## 1.3.14 (2016-11-03)
293+
## Changelog
294+
295+
### 1.3.18 (2016-12-20)
296+
- Akka 2.4.14 -> 2.4.16
297+
298+
### 1.3.17 (2016-12-08)
299+
- Scala 2.12.0 -> 2.12.1
300+
301+
### 1.3.16 (2016-11-22)
302+
- Akka 2.4.13 -> 2.4.14
303+
304+
### 1.3.15 (2016-11-19)
305+
- Akka 2.4.12 -> 2.4.13
306+
307+
### 1.3.14 (2016-11-03)
317308
- cross scala 2.11.8 and 2.12.0 build
318309

319-
## 1.3.13 (2016-11-01 - Birthday Edition!)
310+
### 1.3.13 (2016-11-01 - Birthday Edition!)
320311
- Implemented support for the `akka.persistence.query.TimeBasedUUID`.
321312
- You should set the __new__ configuration key `inmemory-read-journal.offset-mode = "uuid"`, defaults to `sequence`
322313
to produce `EventEnvelope2` that contain `TimeBasedUUID` offset fields.
323314

324-
## 1.3.12 (2016-10-28)
315+
### 1.3.12 (2016-10-28)
325316
- Akka 2.4.11 -> 2.4.12
326317
- Support for the new queries `CurrentEventsByTagQuery2` and `EventsByTagQuery2`, please read the [akka-persistence-query](http://doc.akka.io/docs/akka/2.4.12/scala/persistence-query.html) documentation to see what has changed.
327318
- The akka-persistence-inmemory plugin only supports the `akka.persistence.query.NoOffset` or `akka.persistence.query.Sequence` offset types.
328319
- There is no support for the `akka.persistence.query.TimeBasedUUID` offset type. When used, akka-persistence-inmemory will throw an IllegalArgumentException.
329320

330-
## 1.3.11 (2016-10-23)
321+
### 1.3.11 (2016-10-23)
331322
- Scala 2.11.8 and 2.12.0-RC2 compatible
332323

333-
## 1.3.10 (2016-09-30)
324+
### 1.3.10 (2016-09-30)
334325
- Akka 2.4.10 -> 2.4.11
335326

336-
## 1.3.9 (2016-09-22)
327+
### 1.3.9 (2016-09-22)
337328
- Adapted version of PR #28 by [Yury Gribkov](https://github.com/ygree) - Fix bug: It doesn't adapt events read from journal, thanks!
338329
- As event adapters are no first class citizins of akka-persistence-query (yet), a workaround based on the configuration of akka-persistence-cassandra
339330
has been implemented in the inmemory journal based on the work of [Yury Gribkov](https://github.com/ygree). Basically, the query-journal will look for
@@ -343,173 +334,173 @@ Is Event Sourcing getting traction? I would say so:
343334
configured correctly.
344335
- Removed the non-official and never-to-be-used bulk loading interface
345336

346-
## 1.3.8 (2016-09-07)
337+
### 1.3.8 (2016-09-07)
347338
- Akka 2.4.9 -> Akka 2.4.10
348339

349-
## 1.3.7 (2016-08-21)
340+
### 1.3.7 (2016-08-21)
350341
- Fix for EventsByPersistenceId should terminate when toSequenceNumber is reached as pointed out by [monktastic](https://github.com/monktastic), thanks!
351342

352-
## 1.3.6 (2016-08-20)
343+
### 1.3.6 (2016-08-20)
353344
- Akka 2.4.9-RC2 -> Akka 2.4.9
354345

355-
## 1.3.6-RC2 (2016-08-06)
346+
### 1.3.6-RC2 (2016-08-06)
356347
- Akka 2.4.9-RC1 -> 2.4.9-RC2
357348

358-
## 1.3.6-RC1 (2016-08-03)
349+
### 1.3.6-RC1 (2016-08-03)
359350
- Akka 2.4.8 -> 2.4.9-RC1
360351

361-
## 1.3.5 (2016-07-23)
352+
### 1.3.5 (2016-07-23)
362353
- Support for the __non-official__ bulk loading interface [akka.persistence.query.scaladsl.EventWriter](https://github.com/dnvriend/akka-persistence-query-writer/blob/master/src/main/scala/akka/persistence/query/scaladsl/EventWriter.scala)
363354
added. I need this interface to load massive amounts of data, that will be processed by many actors, but initially I just want to create and store one or
364355
more events belonging to an actor, that will handle the business rules eventually. Using actors or a shard region for that matter, just gives to much
365356
actor life cycle overhead ie. too many calls to the data store. The `akka.persistence.query.scaladsl.EventWriter` interface is non-official and puts all
366357
responsibility of ensuring the integrity of the journal on you. This means when some strange things are happening caused by wrong loading of the data,
367358
and therefor breaking the integrity and ruleset of akka-persistence, all the responsibility on fixing it is on you, and not on the Akka team.
368359

369-
## 1.3.4 (2016-07-17)
360+
### 1.3.4 (2016-07-17)
370361
- Codacy code cleanup release.
371362

372-
## 1.3.3 (2016-07-16)
363+
### 1.3.3 (2016-07-16)
373364
- No need for Query Publishers with the new akka-streams API.
374365

375-
## 1.3.2 (2016-07-09)
366+
### 1.3.2 (2016-07-09)
376367
- Journal entry 'deleted' fixed, must be set manually.
377368

378-
## 1.3.1 (2016-07-09)
369+
### 1.3.1 (2016-07-09)
379370
- Akka 2.4.7 -> 2.4.8,
380371
- Behavior of akka-persistence-query *byTag query should be up to spec,
381372
- Refactored the inmemory plugin code base, should be more clean now.
382373

383-
## 1.3.0 (2016-06-09)
374+
### 1.3.0 (2016-06-09)
384375
- Removed the queries `eventsByPersistenceIdAndTag` and `currentEventsByPersistenceIdAndTag` as they are not supported by Akka natively and can be configured by filtering the event stream.
385376
- Implemented true async queries using the polling strategy
386377

387-
## 1.2.15 (2016-06-05)
378+
### 1.2.15 (2016-06-05)
388379
- Akka 2.4.6 -> 2.4.7
389380

390-
## 1.2.14 (2016-05-25)
381+
### 1.2.14 (2016-05-25)
391382
- Fixed issue Unable to differentiate between persistence failures and serialization issues
392383
- Akka 2.4.4 -> 2.4.6
393384

394-
## 1.2.13 (2016-04-14)
385+
### 1.2.13 (2016-04-14)
395386
- Akka 2.4.3 -> 2.4.4
396387

397-
## 1.2.12 (2016-04-01)
388+
### 1.2.12 (2016-04-01)
398389
- Scala 2.11.7 -> 2.11.8
399390
- Akka 2.4.2 -> 2.4.3
400391

401-
## 1.2.11 (2016-03-18)
392+
### 1.2.11 (2016-03-18)
402393
- Fixed issue on the query api where the offset on eventsByTag and eventsByPersistenceIdAndTag queries were not sequential
403394

404-
## 1.2.10 (2016-03-17)
395+
### 1.2.10 (2016-03-17)
405396
- Refactored the akka-persistence-query interfaces, integrated it back again in one jar, for jcenter deployment simplicity
406397

407-
## 1.2.9 (2016-03-16)
398+
### 1.2.9 (2016-03-16)
408399
- Added the appropriate Maven POM resources to be publishing to Bintray's JCenter
409400

410-
## 1.2.8 (2016-03-03)
401+
### 1.2.8 (2016-03-03)
411402
- Fix for propagating serialization errors to akka-persistence so that any error regarding the persistence of messages will be handled by the callback handler of the Persistent Actor; `onPersistFailure`.
412403

413-
## 1.2.7 (2016-02-18)
404+
### 1.2.7 (2016-02-18)
414405
- Better storage implementation for journal and snapshot
415406

416-
## 1.2.6 (2016-02-17)
407+
### 1.2.6 (2016-02-17)
417408
- Akka 2.4.2-RC3 -> 2.4.2
418409

419-
## 1.2.5 (2016-02-13)
410+
### 1.2.5 (2016-02-13)
420411
- akka-persistence-jdbc-query 1.0.0 -> 1.0.1
421412

422-
## 1.2.4 (2016-02-13)
413+
### 1.2.4 (2016-02-13)
423414
- Akka 2.4.2-RC2 -> 2.4.2-RC3
424415

425-
## 1.2.3 (2016-02-08)
416+
### 1.2.3 (2016-02-08)
426417
- Compatibility with Akka 2.4.2-RC2
427418
- Refactored the akka-persistence-query extension interfaces to its own jar: `"com.github.dnvriend" %% "akka-persistence-jdbc-query" % "1.0.0"`
428419

429-
## 1.2.2 (2016-01-30)
420+
### 1.2.2 (2016-01-30)
430421
- Code is based on [akka-persistence-jdbc](https://github.com/dnvriend/akka-persistence-jdbc)
431422
- Supports the following queries:
432423
- `allPersistenceIds` and `currentPersistenceIds`
433424
- `eventsByPersistenceId` and `currentEventsByPersistenceId`
434425
- `eventsByTag` and `currentEventsByTag`
435426
- `eventsByPersistenceIdAndTag` and `currentEventsByPersistenceIdAndTag`
436427

437-
## 1.2.1 (2016-01-28)
428+
### 1.2.1 (2016-01-28)
438429
- Supports for the javadsl query API
439430

440-
## 1.2.0 (2016-01-26)
431+
### 1.2.0 (2016-01-26)
441432
- Compatibility with Akka 2.4.2-RC1
442433

443-
## 1.1.6 (2015-12-02)
434+
### 1.1.6 (2015-12-02)
444435
- Compatibility with Akka 2.4.1
445436
- Merged PR #17 [Evgeny Shepelyuk](https://github.com/eshepelyuk) Upgrade to AKKA 2.4.1, thanks!
446437

447-
## 1.1.5 (2015-10-24)
438+
### 1.1.5 (2015-10-24)
448439
- Compatibility with Akka 2.4.0
449440
- Merged PR #13 [Evgeny Shepelyuk](https://github.com/eshepelyuk) HighestSequenceNo should be kept on message deletion, thanks!
450441
- Should be a fix for [Issue #13 - HighestSequenceNo should be kept on message deletion](https://github.com/dnvriend/akka-persistence-inmemory/issues/13) as per [Akka issue #18559](https://github.com/akka/akka/issues/18559)
451442

452-
## 1.1.4 (2015-10-17)
443+
### 1.1.4 (2015-10-17)
453444
- Compatibility with Akka 2.4.0
454445
- Merged PR #12 [Evgeny Shepelyuk](https://github.com/eshepelyuk) Live version of eventsByPersistenceId, thanks!
455446

456-
## 1.1.3 (2015-10-02)
447+
### 1.1.3 (2015-10-02)
457448
- Compatibility with Akka 2.4.0
458449
- Akka 2.4.0-RC3 -> 2.4.0
459450

460-
## 1.1.3-RC3 (2015-09-24)
451+
### 1.1.3-RC3 (2015-09-24)
461452
- Merged PR #10 [Evgeny Shepelyuk](https://github.com/eshepelyuk) Live version of allPersistenceIds, thanks!
462453
- Compatibility with Akka 2.4.0-RC3
463454
- Use the following library dependency: `"com.github.dnvriend" %% "akka-persistence-inmemory" % "1.1.3-RC3"`
464455

465-
## 1.1.1-RC3 (2015-09-19)
456+
### 1.1.1-RC3 (2015-09-19)
466457
- Merged Issue #9 [Evgeny Shepelyuk](https://github.com/eshepelyuk) Initial implemenation of Persistence Query for In Memory journal, thanks!
467458
- Compatibility with Akka 2.4.0-RC3
468459
- Use the following library dependency: `"com.github.dnvriend" %% "akka-persistence-inmemory" % "1.1.1-RC3"`
469460

470-
## 1.1.0-RC3 (2015-09-17)
461+
### 1.1.0-RC3 (2015-09-17)
471462
- Merged Issue #6 [Evgeny Shepelyuk](https://github.com/eshepelyuk) Conditional ability to perform full serialization while adding messages to journal, thanks!
472463
- Compatibility with Akka 2.4.0-RC3
473464
- Use the following library dependency: `"com.github.dnvriend" %% "akka-persistence-inmemory" % "1.1.0-RC3"`
474465

475-
## 1.1.0-RC2 (2015-09-05)
466+
### 1.1.0-RC2 (2015-09-05)
476467
- Compatibility with Akka 2.4.0-RC2
477468
- Use the following library dependency: `"com.github.dnvriend" %% "akka-persistence-inmemory" % "1.1.0-RC2"`
478469

479-
## 1.0.5 (2015-09-04)
470+
### 1.0.5 (2015-09-04)
480471
- Compatibilty with Akka 2.3.13
481472
- Akka 2.3.12 -> 2.3.13
482473

483-
## 1.1.0-RC1 (2015-09-02)
474+
### 1.1.0-RC1 (2015-09-02)
484475
- Compatibility with Akka 2.4.0-RC1
485476
- Use the following library dependency: `"com.github.dnvriend" %% "akka-persistence-inmemory" % "1.1.0-RC1"`
486477

487-
## 1.0.4 (2015-08-16)
478+
### 1.0.4 (2015-08-16)
488479
- Scala 2.11.6 -> 2.11.7
489480
- Akka 2.3.11 -> 2.3.12
490481
- Apache-2.0 license
491482

492-
## 1.0.3 (2015-05-25)
483+
### 1.0.3 (2015-05-25)
493484
- Merged Issue #2 [Sebastián Ortega](https://github.com/sortega) Regression: Fix corner case when persisted events are deleted, thanks!
494485
- Added test for the corner case issue #1 and #2
495486

496-
## 1.0.2 (2015-05-20)
487+
### 1.0.2 (2015-05-20)
497488
- Refactored from the ConcurrentHashMap implementation to a pure Actor managed concurrency model
498489

499-
## 1.0.1 (2015-05-16)
490+
### 1.0.1 (2015-05-16)
500491
- Some refactoring, fixed some misconceptions about the behavior of Scala Futures one year ago :)
501492
- Akka 2.3.6 -> 2.3.11
502493
- Scala 2.11.1 -> 2.11.6
503494
- Scala 2.10.4 -> 2.10.5
504495
- Merged Issue #1 [Sebastián Ortega](https://github.com/sortega) Fix corner case when persisted events are deleted, thanks!
505496

506-
## 1.0.0 (2014-09-25)
497+
### 1.0.0 (2014-09-25)
507498
- Moved to bintray
508499

509-
## 0.0.2 (2014-09-05)
500+
### 0.0.2 (2014-09-05)
510501
- Akka 2.3.4 -> 2.3.6
511502

512-
## 0.0.1 (2014-08-19)
503+
### 0.0.1 (2014-08-19)
513504
- Initial Release
514505

515506
Have fun!

build.sbt

+1-58
Original file line numberDiff line numberDiff line change
@@ -12,61 +12,4 @@
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
15-
*/
16-
17-
name := "akka-persistence-inmemory"
18-
19-
organization := "com.github.dnvriend"
20-
21-
version := "1.3.14"
22-
23-
scalaVersion := "2.11.8"
24-
25-
crossScalaVersions := Seq("2.11.8", "2.12.0")
26-
27-
scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation", "-feature")
28-
29-
libraryDependencies ++= {
30-
val akkaVersion = "2.4.12"
31-
Seq(
32-
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
33-
"com.typesafe.akka" %% "akka-persistence" % akkaVersion,
34-
"com.typesafe.akka" %% "akka-persistence-query-experimental" % akkaVersion,
35-
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
36-
"org.scalaz" %% "scalaz-core" % "7.2.7",
37-
"com.datastax.cassandra" % "cassandra-driver-core" % "3.1.2",
38-
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion % Test,
39-
"ch.qos.logback" % "logback-classic" % "1.1.7" % Test,
40-
"com.typesafe.akka" %% "akka-persistence-tck" % akkaVersion % Test,
41-
"com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % Test,
42-
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % Test,
43-
"org.scalatest" %% "scalatest" % "3.0.0" % Test
44-
)
45-
}
46-
47-
fork in Test := true
48-
49-
parallelExecution in Test := false
50-
51-
licenses += ("Apache-2.0", url("http://opensource.org/licenses/apache2.0.php"))
52-
53-
// enable scala code formatting //
54-
import com.typesafe.sbt.SbtScalariform
55-
56-
import scalariform.formatter.preferences._
57-
58-
// Scalariform settings
59-
SbtScalariform.autoImport.scalariformPreferences := SbtScalariform.autoImport.scalariformPreferences.value
60-
.setPreference(AlignSingleLineCaseStatements, true)
61-
.setPreference(AlignSingleLineCaseStatements.MaxArrowIndent, 100)
62-
.setPreference(DoubleIndentClassDeclaration, true)
63-
64-
// enable updating file headers //
65-
import de.heikoseeberger.sbtheader.license.Apache2_0
66-
67-
headers := Map(
68-
"scala" -> Apache2_0("2016", "Dennis Vriend"),
69-
"conf" -> Apache2_0("2016", "Dennis Vriend", "#")
70-
)
71-
72-
enablePlugins(AutomateHeaderPlugin)
15+
*/

0 commit comments

Comments
 (0)