Before start working on this project, you need install Consul and Mosquitto.
docker run -d -p 8500:8500 consul agent -dev -client=0.0.0.0 -bind=0.0.0.0
docker run -d -p 1883:1883 -p 9001:9001 eclipse-mosquitto
In project root launch :
docker-compose up
After Consul container has been launched, add a new config named "topics" in key/value page. Add the following content to this new config :
{
"ilab" : {
"thermal" : ["sensor1", "sensor2", "sensor4"],
"particule" : []
},
"cds" : {}
}
In development mode you can "simulate" sensor data with :
python mosquitto-sender.py sensor1
Random value between 20 and 40 will be sent periodically in Mosquitto on "thermal/sensor1" topic.
Application can be launch with this command :
mvn compile quarkus:dev
After it's started, go to http://localhost:8080/thermal/stream to show sensors values (refresh dynamically).