Skip to content

jfjara/kafka-producer-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Kafka Producer example

A simple kafka producer messages with API REST interface to send messages from a client to Kafka Topics

##Technology used

  • Developed with Java 17
  • Spring Boot 2.7.3
  • Hexagonal Architecture
  • Testing with junit (Júpiter) and Mockito.
  • Jacoco for testing coverage
  • Kafka Clients 3.2.1
  • Factory Pattern, Builder Pattern, Singleton Pattern...
  • MapStruct
  • Lombok
  • Documentation and API controller and model definitions autogenerated by OpenAPI 3.0.3 and Swagger UI

##Swagger UI

Once the application starts you can see the API documentation in:

http://localhost:8081/swagger-ui/index.html

##Kafka Server

You can configure a simple Kafka Server - Zookeeper with Docker:

docker pull johnnypark/kafka-zookeeper

To execute:

docker run -p 2181:2181 -p 9092:9092 -e ADVERTISED_HOST=127.0.0.1 -e NUM_PARTITIONS=3 johnnypark/kafka-zookeeper

###TO DO:

  • Security
  • MockMvc tests
  • Include a MongoDB to save requests
  • Include Webflux
  • Add metrics

About

A kafka producer REST API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages