An open API service indexing awesome lists of open source software.

https://github.com/qreolq/data-generator-microservice

This application produces data and sends it to Data consumer service with Apache Kafka.
https://github.com/qreolq/data-generator-microservice

apache-kafka ci-cd docker java spring

Last synced: about 2 months ago
JSON representation

This application produces data and sends it to Data consumer service with Apache Kafka.

Awesome Lists containing this project

README

          

# Data-generator-microservice

This application produces data and sends it to [Data consumer service](https://github.com/qReolq/data-analyser-microservice) with Apache Kafka.

### Technologies
Spring(Boot), Docker, Apache Kafka, CI/CD(Github actions)

### Usage

You can find Docker compose file in [Data analyser service](https://github.com/qReolq/data-analyser-microservice) docker/docker-compose.yaml.

Application is running on port 8081.

### Environments
To start an application you need to pass variables to .env file.

* KAFKA_BOOTSTRAP_SERVERS - Bootstrap server in Kafka

### Endpoints
* POST /api/v1/data/send

Example JSON
```JSON
{
"sensorId": 1,
"timestamp": "2023-09-12T12:10:05",
"measurement": 12.5,
"measurementType": "TEMPERATURE"
}
```

* POST /api/v1/data/test/send

Example JSON

```JSON
{
"delayInSeconds": 3,
"measurementTypes": [
"POWER",
"VOLTAGE",
"TEMPERATURE"
]
}
```