Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Latest commit

 

History

History

database-storage

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Database Storage Service

The Quarkus service database-storage consumes messages from the Kafka channel sensors and persists them in a PostgreSQL database. Idea is that this services is then available to provide historical sensor data for further analytics.

Run

To run a the service database-storage in Quarkus development mode without the need to separate build and run, you can use the Quarkus plugin via the Maven wrapper.

./mvnw quarkus:dev \
    -Dquarkus.http.port=<port>

Keep in mind that not only the Kafka topic sensors but also the PostgreSQL database should be available.

Interact With PostgreSQL Database

The credentials for the database user can be found in init-databases.sql. Use these credentials to exec in the postgres container and interact with the database directly.

docker exec -it postgres psql \
    -d sensor_data_storage -U sensors -W