Skip to content

mstreitner/quarkus-kafka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kafka-example

A small Quarkus + Kafka playground that lets you run a local Kafka stack via Podman and push messages through a simple pipeline.

Local infrastructure (Podman)

This repo ships a local stack defined in docker-compose.yml:

  • Kafka (KRaft mode, no ZooKeeper)
  • Kafka Connect (REST API on :8083)
  • Kafbat UI (web UI on :8080)
  • Apicurio Registry (HTTP API/UI on :8082, backed by Postgres)
  • Postgres (for Apicurio storage, on :5432)
  • A one-shot init container that creates the demo topics

Start

podman-compose up -d

Stop / cleanup

podman-compose down

URLs

Topics

The compose stack auto-creates these topics on startup:

  • example-input-v1
  • example-output-v1

Quarkus application flow

The app demonstrates a minimal end-to-end flow:

  1. The REST endpoint publishes to the input topic.
  2. InputConsumer consumes, transforms the payload, then publishes to the output topic.
  3. (Optional) You can observe output via Kafka tooling / UI.

Running the application

Dev mode:

./mvnw quarkus:dev

Publish a message via HTTP

Call the endpoint with a value query param.

  • It will generate a random UUID as Kafka record key
  • It will publish the query param string as the record value
curl "http://localhost:8080/publish?value=hello"

Expected response:

{"key":"<uuid>","value":"hello"}

Packaging and running

./mvnw package
java -jar target/quarkus-app/quarkus-run.jar

Related Guides

About

Quickstart Kafka example in Quarkus

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages