Setup
Get MicroRaft into your project or run the repository locally in a few minutes.
./gradlew :microraft-tutorial:test --tests io.microraft.tutorial.OperationCommitTestAdd the dependency
MicroRaft JARs are available via Maven Central.
Gradle version catalog
[versions]
microraft = "0.9"
[libraries]
microraft = { module = "io.microraft:microraft", version.ref = "microraft" }
Gradle Kotlin DSL
implementation("io.microraft:microraft:0.9")
Maven
<dependency>
<groupId>io.microraft</groupId>
<artifactId>microraft</artifactId>
<version>0.9</version>
</dependency>
Build from source
If you want to inspect or run the repository locally, clone it and use the Gradle wrapper.
gh repo clone MicroRaft/MicroRaft
cd MicroRaft
./gradlew build
The built artifacts land under microraft/build/libs, microraft-hocon/build/libs, and microraft-yaml/build/libs.
Quick Start
Run the local 3-node tutorial cluster before integrating the library into your own service.
./gradlew :microraft-tutorial:test \
--tests io.microraft.tutorial.OperationCommitTest
- the build targets Java 11
- make sure Java 11 is installed locally before running the command
LeaderElectionTestis the shortest smoke test for cluster formation
Logging and next steps
MicroRaft depends only on SLF4J for logging. Enable INFO for io.microraft; use DEBUG only when you actually want deep protocol noise.