Installation¶
System Requirements¶
| Component | Version |
|---|---|
| Java | 17 or higher |
| Spring Boot | 3.0+ |
| Apache Kafka | 2.8+ (3.0+ recommended) |
| Build Tool | Gradle 7+ or Maven 3.6+ |
Dependency Installation¶
Gradle¶
Add to your build.gradle:
repositories {
mavenCentral()
}
dependencies {
implementation 'io.github.closeup1202:curve:0.2.0'
}
Maven¶
Add to your pom.xml:
<dependencies>
<dependency>
<groupId>io.github.closeup1202</groupId>
<artifactId>curve</artifactId>
<version>0.2.0</version>
</dependency>
</dependencies>
Optional Dependencies¶
Avro Serialization¶
If you want to use Avro serialization (serde.type: AVRO), add:
<repositories>
<repository>
<id>confluent</id>
<url>https://packages.confluent.io/maven/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>1.11.4</version>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-avro-serializer</artifactId>
<version>7.5.0</version>
</dependency>
</dependencies>
JSON by Default
Curve uses JSON serialization by default, which requires no additional dependencies.
Database for Transactional Outbox¶
If using the transactional outbox pattern, ensure you have a JPA-compatible database:
// Example: PostgreSQL
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
runtimeOnly 'org.postgresql:postgresql'
Version Compatibility¶
| Curve Version | Spring Boot | Kafka Client | Java |
|---|---|---|---|
| 0.2.0 | 3.5.x | 3.8.x | 17+ |
| 0.1.x | 3.5.x | 3.8.x | 17+ |
| 0.1.0 | 3.5.x | 3.8.x | 17+ |
| 0.0.5 | 3.5.x | 3.8.x | 17+ |
| 0.0.2 | 3.5.x | 3.8.x | 17+ |
| 0.0.1 | 3.4.x | 3.7.x | 17+ |
Verify Installation¶
After adding the dependency, verify Curve is correctly installed:
1. Build Your Project¶
2. Check Auto-Configuration¶
Enable debug logging to see if Curve auto-configuration is loaded:
Start your application and look for:
3. Test Health Endpoint¶
Expected response:
{
"status": "UP",
"details": {
"kafkaProducerInitialized": true,
"clusterId": "lkc-abc123",
"nodeCount": 3,
"topic": "event.audit.v1",
"dlqTopic": "event.audit.dlq.v1"
}
}
Troubleshooting¶
Dependency Resolution Fails¶
Error: Could not find io.github.closeup1202:curve:0.2.0
Solution: Ensure Maven Central is in your repositories:
Auto-Configuration Not Loading¶
Curve features not working
Check:
- Spring Boot version is 3.0+
curve.enabled=truein application.yml- No conflicting auto-configurations
Kafka Client Version Conflict¶
ClassNotFoundException or MethodNotFoundException
Solution: Align Kafka client versions:
Next Steps¶
Once installed, proceed to:
- Quick Start Guide - Create your first event
- Configuration - Set up production settings
- First Event Tutorial - Detailed walkthrough
Need Help?
If you encounter issues, check the Troubleshooting Guide or open an issue.