Getting Started
Installation
Step 1: Enable the REST API and console
The REST API and console can be enabled independently. The console requires the REST API to also be enabled — it calls the same endpoints under the hood.
Step 2: Implement KafkaOpsAwareConsumer on your Kafka consumers
@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");
}
}
That's it. The library auto-discovers all KafkaOpsAwareConsumer beans at startup.
With DLT and retry topics
If your consumer has a Dead Letter Topic and a retry topic, declare them on TopicConfig:
This enables:
- Browsing and polling DLT/retry topics in the console
- One-click DLT routing (drain DLT messages back to the retry topic)
Step 3: Open the console
Navigate to http://localhost:8080/kafka-ops/index.html — select a consumer from the sidebar to start polling or browsing.
Next steps
- Configuration — Tune poll timeouts, batch limits, DLT routing schedules
- REST API — Use the endpoints programmatically
- DLT Routing — Set up automatic Dead Letter Topic routing
- Message Formats — Configure Avro, Protobuf, or custom key and value codecs