SIGN IN SIGN UP
akka / akka-core UNCLAIMED

A platform to build and run apps that are elastic, agile, and resilient. SDK, libraries, and hosted environments.

13270 0 1 Scala
val AkkaVersion = "2.10.17"
val AlpakkaKafkaVersion = "7.0.1"
val AkkaManagementVersion = "1.6.0"
val AkkaHttpVersion = "10.7.0"
val EmbeddedKafkaVersion = "3.7.0"
val LogbackVersion = "1.5.18"
ThisBuild / scalaVersion := "2.13.15"
ThisBuild / organization := "com.lightbend.akka.samples"
ThisBuild / Compile / scalacOptions ++= Seq(
"-deprecation",
"-feature",
"-unchecked",
"-Xlog-reflective-calls",
"-Xlint")
ThisBuild / Test / javacOptions ++= Seq("-Xlint:unchecked", "-Xlint:deprecation")
ThisBuild / Test / testOptions += Tests.Argument("-oDF")
ThisBuild / licenses := Seq(("CC0", url("http://creativecommons.org/publicdomain/zero/1.0")))
ThisBuild / run / fork := true
ThisBuild / run / connectInput := true
lazy val `akka-sample-kafka-to-sharding` = project.in(file(".")).aggregate(producer, processor, client)
lazy val kafka = project
.in(file("kafka"))
.settings(
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % LogbackVersion,
"org.slf4j" % "log4j-over-slf4j" % "2.0.17",
"io.github.embeddedkafka" %% "embedded-kafka" % EmbeddedKafkaVersion),
cancelable := false)
lazy val client = project
.in(file("client"))
.enablePlugins(AkkaGrpcPlugin)
.settings(
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-stream" % AkkaVersion,
"com.typesafe.akka" %% "akka-pki" % AkkaVersion,
"com.typesafe.akka" %% "akka-discovery" % AkkaVersion,
"ch.qos.logback" % "logback-classic" % LogbackVersion))
lazy val processor = project
.in(file("processor"))
.enablePlugins(AkkaGrpcPlugin)
.settings(
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-stream-kafka" % AlpakkaKafkaVersion,
"com.typesafe.akka" %% "akka-stream-kafka-cluster-sharding" % AlpakkaKafkaVersion,
"com.typesafe.akka" %% "akka-stream" % AkkaVersion,
"com.typesafe.akka" %% "akka-discovery" % AkkaVersion,
"com.typesafe.akka" %% "akka-cluster-sharding-typed" % AkkaVersion,
"com.typesafe.akka" %% "akka-stream-typed" % AkkaVersion,
"com.typesafe.akka" %% "akka-serialization-jackson" % AkkaVersion,
"com.lightbend.akka.management" %% "akka-management" % AkkaManagementVersion,
"com.lightbend.akka.management" %% "akka-management-cluster-http" % AkkaManagementVersion,
"com.typesafe.akka" %% "akka-http-spray-json" % AkkaHttpVersion,
"ch.qos.logback" % "logback-classic" % LogbackVersion,
"com.typesafe.akka" %% "akka-actor-testkit-typed" % AkkaVersion % Test,
"org.scalatest" %% "scalatest" % "3.2.18" % Test))
lazy val producer = project
.in(file("producer"))
.settings(Compile / PB.targets := Seq(scalapb.gen() -> (Compile / sourceManaged).value))
.settings(
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-stream-kafka" % AlpakkaKafkaVersion,
"com.typesafe.akka" %% "akka-stream" % AkkaVersion,
"ch.qos.logback" % "logback-classic" % LogbackVersion,
"org.scalatest" %% "scalatest" % "3.2.18" % Test))