To start an application you need to pass variables to .env
file.
Application is running on port 8081
.
KAFKA_BOOTSTRAP_SERVERS=localhost:9092
Application has two endpoints:
- POST
/api/v1/data/send
{
"sensorId": 1,
"timestamp": "2023-09-12T12:10:05",
"measurement": 15.5,
"measurementType": "TEMPERATURE"
}
- POST
/api/v1/data/test/send
{
"delayInSeconds": 3,
"measurementTypes": [
"POWER",
"VOLTAGE",
"TEMPERATURE"
]
}
This is data generator microservice for YouTube course.