Code Monkey home page Code Monkey logo

iss-policy-search-service's Introduction

iss-policy-search-service

CoverageQuality Gate Status

We decided to implement it in an extremely simplified version of an insurance sales system to test the following aspects of microservice development:

  • Project creation and development
  • Access of both relational and NoSQL databases
  • Blocking and non-blocking operations implementation
  • Microservice to microservice communication (synchronous and asynchronous)
  • Service discovery
  • Running background jobs

Architecture

The iss-policy-search-service microservice is responsible to provided an insurance policy search function. This module listened for events from Kafka, converted received DTOs to “read model” (used later in search), and saved the results in a database. It also exposed a REST endpoint for search policies.

In the Integration Tests, the Testcontainers Java library is used for starting kafka in a docker container.

How to run Application

Running application from command line using Docker, this is the cleanest way. In order for this approach to work, of course, you need to have Docker installed in your local environment.

  • From the root directory you can run the following command:
    docker-compose -f docker/docker-compose.yml up --build
  • Application will be running on: http://localhost:8083
  • To stop it you can open other terminal in the same directory, and then run the following command:
    docker-compose -f docker/docker-compose.yml down

How to run the Unit Test

mvn -B clean verify

How to run the Integration Test

Option 1:

  • Import the testcontainers-demo application as a Maven project to your IDE.
  • Run maven clean verify with profile 'integration-test' to build the project and start running the IT tests.
    mvn -B clean verify -Pintegration-test

Option 2:

  • Import the testcontainers-demo application as a Maven project to your IDE.
  • Run maven clean install command to build the project.
  • Then you can search for XXXIT.java or XXXE2ETestCase.java class and run it as a junit test.

iss-policy-search-service's People

Contributors

francois-poirier avatar gortazar avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.