Getting started

Thoth is published on maven central.

Thoth is reactive on its core, but it could be used is a blocking context.

Modules

Commons events

Basic interface concerning events. This module is required

sbt
val ThothVersion = "0.1.0*"
libraryDependencies += "fr.maif" % "commons-events$" % ThothVersion
Maven
<properties>
  <thoth.version>0.1.0*</thoth.version>
</properties>
<dependencies>
  <dependency>
    <groupId>fr.maif</groupId>
    <artifactId>commons-events$</artifactId>
    <version>${thoth.version}</version>
  </dependency>
</dependencies>
Gradle
def versions = [
  ThothVersion: "0.1.0*"
]
dependencies {
  implementation "fr.maif:commons-events$:${versions.ThothVersion}"
}

Thoth core

Main interfaces and implementations. This module is required.

sbt
val ThothVersion = "0.1.0*"
libraryDependencies += "fr.maif" % "thoth-core$" % ThothVersion
Maven
<properties>
  <thoth.version>0.1.0*</thoth.version>
</properties>
<dependencies>
  <dependency>
    <groupId>fr.maif</groupId>
    <artifactId>thoth-core$</artifactId>
    <version>${thoth.version}</version>
  </dependency>
</dependencies>
Gradle
def versions = [
  ThothVersion: "0.1.0*"
]
dependencies {
  implementation "fr.maif:thoth-core$:${versions.ThothVersion}"
}

Thoth core-akka, thoth-jooq-akka and thoth-kafka-consumer-akka

Those modules are not maintained anymore since the version switch of akka.

Thoth core reactor

Basically, this module is used to garanti the publication of events in kafka (outbox pattern). Unless you bring your own implementation, this module is required. It uses reactor, but the reactor API is not exposed.

sbt
val ThothVersion = "0.1.0*"
libraryDependencies += "fr.maif" % "thoth-reactor$" % ThothVersion
Maven
<properties>
  <thoth.version>0.1.0*</thoth.version>
</properties>
<dependencies>
  <dependency>
    <groupId>fr.maif</groupId>
    <artifactId>thoth-reactor$</artifactId>
    <version>${thoth.version}</version>
  </dependency>
</dependencies>
Gradle
def versions = [
  ThothVersion: "0.1.0*"
]
dependencies {
  implementation "fr.maif:thoth-reactor$:${versions.ThothVersion}"
}

Jdbc (Thoth jooq)

A jooq + jdbc implémentation of the event store.

If your app is running on a servlet context, you should use this module. Jooq is used on the inner implementation but, it’s not required for your business code.

sbt
val ThothVersion = "0.1.0*"
libraryDependencies += "fr.maif" % "thoth-jooq$" % ThothVersion
Maven
<properties>
  <thoth.version>0.1.0*</thoth.version>
</properties>
<dependencies>
  <dependency>
    <groupId>fr.maif</groupId>
    <artifactId>thoth-jooq$</artifactId>
    <version>${thoth.version}</version>
  </dependency>
</dependencies>
Gradle
def versions = [
  ThothVersion: "0.1.0*"
]
dependencies {
  implementation "fr.maif:thoth-jooq$:${versions.ThothVersion}"
}

Reactive (Thoth jooq reactor)

A jooq with jdbc or vertx-sql implémentation of the event store.

This module is based on https://github.com/MAIF/jooq-async to access database. Jooq async provided a jdbc (thread pool based) and vertx implémentation (reactive) at the moment.

If your app is running on a reactive context, you should use this module. Jooq is used on the inner implementation but, it’s not required for your business code.

sbt
val ThothVersion = "0.1.0*"
libraryDependencies += "fr.maif" % "thoth-jooq-reactor$" % ThothVersion
Maven
<properties>
  <thoth.version>0.1.0*</thoth.version>
</properties>
<dependencies>
  <dependency>
    <groupId>fr.maif</groupId>
    <artifactId>thoth-jooq-reactor$</artifactId>
    <version>${thoth.version}</version>
  </dependency>
</dependencies>
Gradle
def versions = [
  ThothVersion: "0.1.0*"
]
dependencies {
  implementation "fr.maif:thoth-jooq-reactor$:${versions.ThothVersion}"
}

thoth-kafka-consumer-reactor

A helper module to consume kafka topics. This module handle for you retries, concurrent consumption by partition etc

sbt
val ThothVersion = "0.1.0*"
libraryDependencies += "fr.maif" % "thoth-kafka-consumer-reactor$" % ThothVersion
Maven
<properties>
  <thoth.version>0.1.0*</thoth.version>
</properties>
<dependencies>
  <dependency>
    <groupId>fr.maif</groupId>
    <artifactId>thoth-kafka-consumer-reactor$</artifactId>
    <version>${thoth.version}</version>
  </dependency>
</dependencies>
Gradle
def versions = [
  ThothVersion: "0.1.0*"
]
dependencies {
  implementation "fr.maif:thoth-kafka-consumer-reactor$:${versions.ThothVersion}"
}

Summary by usages

Context Dependencies
Servlet / Blocking / Thread based commons-events
thoth-core
thoth-core-reactor
thoth-jooq
Reactive commons-events
thoth-core
thoth-core-reactor
thoth-jooq-reactor