Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 2.44 KB

README.md

File metadata and controls

56 lines (37 loc) · 2.44 KB

kafka-service

License: MIT

Spring Boot Application for your Kafka testing needs.

Requirements

For building and running the application you need:

Documentation

https://github.com/fauxauldrich/kafka-service/wiki

Running the application locally

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. (Modify docker-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}```

Run from your IDE

  • Execute the main method in the com.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

Copyright

Released under the MIT License. See the LICENSE file.