A Spring Boot starter that adds REST endpoints and an embedded web console for Kafka message operations — poll, retry, corrections, batch browse, and DLT routing — without any extra infrastructure.
- Poll & browse — Inspect messages by offset or timestamp with full metadata (key, headers, timestamp)
- Retry — Re-consume a failed message through your existing consumer logic
- Correct — Edit a payload and send it directly to your consumer
- DLT routing — Automatically drain Dead Letter Topics back to retry topics
- Web console — Browser-based UI embedded in your service, no separate deployment
- Zero config — Auto-discovers your consumers at startup, uses your app's own serialization
See the full demo with Avro, Protobuf, and JSON consumers
Maven:
<dependency>
<groupId>io.github.ahmedsarie</groupId>
<artifactId>spring-boot-starter-kafka-ops</artifactId>
<version>0.2.5</version>
</dependency>Gradle:
implementation("io.github.ahmedsarie:spring-boot-starter-kafka-ops:0.2.5")1. Enable the API and console:
kafka:
ops:
rest-api:
enabled: true
console:
enabled: true2. Implement KafkaOpsAwareConsumer on your Kafka consumer:
@Service
public class OrderConsumer implements KafkaOpsAwareConsumer<String, OrderEvent> {
@KafkaListener(topics = "orders")
@Override
public void consume(ConsumerRecord<String, OrderEvent> record) {
// your existing consumer logic
}
@Override
public TopicConfig getTopic() {
return TopicConfig.of("orders");
}
}3. Open the console at http://localhost:8080/kafka-ops/index.html
Full documentation is available at ahmedsarie.github.io/spring-boot-starter-kafka-ops:
- Getting Started — Installation and setup
- Configuration — All available properties
- REST API — Full endpoint reference
- Web Console — Console features
- DLT Routing — Dead Letter Topic routing
- Message Formats — Avro, Protobuf, custom key and value codecs
- Security — Securing endpoints and console
This library does not provide its own authentication or authorization. Secure the endpoints and console using your application's existing security infrastructure (Spring Security, API gateway, etc.). See the security guide for details.
git clone [email protected]:AhmedSarie/spring-boot-starter-kafka-ops.git
cd spring-boot-starter-kafka-ops
./mvnw verifyMIT
