Skip to content

Latest commit

 

History

History
53 lines (41 loc) · 1.67 KB

README.md

File metadata and controls

53 lines (41 loc) · 1.67 KB

Elastic search service

This service listens to events from cloud events from Azure Eventhub/Gcp Pubsub. The event is then saved to the Elasticsearch server. An endpoint is exposed which will fetch the data from Elasticsearch and return back the appropriate response.

Prerequisites

We need to configure the event source to listen and the target persistent store.

  • Azure config

    • spring.kafka
      • bootstrap-servers:
      • properties.sasl.jaas.config:
    • topic
      • producer: img
  • GCP config

    • pubsub
      • topic:
      • subscriptionId
      • projected
      • credentials
    • elastic
      • hostname
      • port img_1

Local setup

  • Setup elastic docker images
docker compose up -d
  • Run the application
mvn springboot:run --Dspring-boot.run.profiles=azure

Sonar Configuration

We have integrated sonar in our project for inspection of code quality to perform automatic reviews with static analysis of code to detect bugs, code smells, and security.

Execute the following Maven command to run Sonar analysis:

mvn clean verify sonar:sonar

Sonar report

sonarReport.png

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.