Code Analysis at: https://sonarcloud.io/dashboard?id=microservice
- Build the microservice app
./gradlew build
- Start the application
docker-compose up --build
Different versions will be implemented using the Adapter Based versioning strategy. In this strategy a single build of the application is responsible for providing all versions of the API protocol that are still supported. The latest version model object is “adapted” to the older version JSON formats by wrapping it in a wrapper object.
Clients are required to specify the version of the service they want to use. The version is specified by setting the ‘Accept’ and 'Content-Type' header values to the version number the client is requesting/sending. If the client does not specify a version, the service will return a 415 response. Clients should ignore any unrecognized JSON attributes when parsing responses.
- Add the following entry to your /etc/hosts file
127.0.0.1 kafka
- Download Kafka
- Unzip Kafka. The installation directory will be referred to as $KAFKA_HOME
- Run the following command to create a requset producer
$KAFKA_HOME/bin/./kafka-console-producer.sh --broker-list localhost:9092 --topic test
- Run the following command to create a response consumer
$KAFKA_HOME/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic testResponse --from-beginning
- In the producer terminal, type your message. You should then see a response on the consumer console.
- API Documentation - /swagger-ui.html
- Log Configuration - /loggers
- Audit Events - /auditevents