This repository shows how to build reactive applications in Java 8 using the Akka framework, on Akka Persistence, with cassandra as backend, and exposing an event sourced stream using HTTP.
In addition, it contains several extensions for kamon that provide insight to a running, clustered akka application.
The repository consists of the following modules:
- ts-reaktive-actors contains the base Java classes with which a reactive application can be built
- ts-reaktive-testkit provides a test framework for testing akka routes with real HTTP
- ts-reaktive-testkit-assertj provides AssertJ-style assertions for Java 8 CompletionStage (with wait support) and Jackson's JsonNode.
- ts-reaktive-kamon-akka provides dead letter monitoring for an actor system. Just have it on your classpath to enable.
- ts-reaktive-kamon-akka-http provides http server monitoring for akka streams http. Just have it on your classpath to enable.
- ts-reaktive-kamon-akka-cluster provides cluster membership monitoring for akka clustering. Just have it on your classpath to enable.
- ts-reaktive-kamon-log4j provides log4j error and warning monitoring. Just have it on your classpath to enable.
If you use SBT, you can use this library by adding the following:
resolvers += Resolver.bintrayRepo("jypma", "maven")
libraryDependencies ++= {
val version = "0.0.7"
Seq(
"com.tradeshift" % "ts-reaktive-actors" % version,
"com.tradeshift" %% "ts-reaktive-akka" % version,
"com.tradeshift" % "ts-reaktive-cassandra" % version,
"com.tradeshift" % "ts-reaktive-ssl" % version,
"com.tradeshift" % "ts-reaktive-testkit" % version % "test",
"com.tradeshift" % "ts-reaktive-testkit-assertj" % version % "test",
"com.tradeshift" %% "ts-reaktive-kamon-akka" % version,
"com.tradeshift" %% "ts-reaktive-kamon-akka-http" % version,
"com.tradeshift" %% "ts-reaktive-kamon-akka-cluster" % version,
"com.tradeshift" %% "ts-reaktive-kamon-log4j" % version
)
}
If you use Maven, you can add the following to your settings.xml
file or your pom.xml
, and then add the individual dependencies
shown above:
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-jypma-maven</id>
<name>bintray</name>
<url>http://dl.bintray.com/jypma/maven</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-jypma-maven</id>
<name>bintray-plugins</name>
<url>http://dl.bintray.com/jypma/maven</url>
</pluginRepository>
</pluginRepositories>
Visit bintray and click "Set me up".