Spring Boot Application for your Kafka testing needs.
For building and running the application you need:
https://github.com/fauxauldrich/kafka-service/wiki
Run as a Docker container
Fastest way to get started is by using the image available on Docker Hub:
- Use the
docker-compose.yml
to bring up your container. (Modifydocker-compose.yml
to reflect the dir path for your truststore files under volumes and update environment variables accordingly) - Or alternatively, to build image locally use Dockerfile provided.
- Build with :
docker build -t kafka-service:${VERSION} .
- Run as a container using:
docker run -d -env spring.kafka.bootstrap-servers=127.0.0.1:9092 -env kafkaservice.truststore.location=/app/certs/truststore.jks -env kafkaservice.truststore.password=Password@123 --name kafka-service -p 8080:8080 -v /dir/containing/truststore.jks/files:/app/certs kafka-service:${VERSION}```
- Build with :
Run from your IDE
- Execute the
main
method in thecom.fauxauldrich.kafkaservice.KafkaServiceApplication
class from your IDE. - Or you can use the Spring Boot Maven plugin like so:
mvn spring-boot:run
Run as a JAR
-
You can also download the JAR file from Releases and run it locally:
java -Dspring.kafka.bootstrap-servers=127.0.0.1:9092 -Dkafkaservice.truststore.location=/home/truststore.jks -Dkafkaservice.truststore.password=Password -jar kafka-service-${VERSION}-java11.jar
-
Or, you can build locally and run the jar file
./mvnw clean install package -f pom.xml java -Dspring.kafka.bootstrap-servers=127.0.0.1:9092 -Dkafkaservice.truststore.location=/home/truststore.jks -Dkafkaservice.truststore.password=Password -jar target/kafka-service-${VERSION}-java11.jar
Released under the MIT License. See the LICENSE file.