fixed some old documentation and fixed typo in README
This commit is contained in:
parent
bf3e1310af
commit
1c2348320a
3 changed files with 11 additions and 9 deletions
16
README.md
16
README.md
|
@ -1,6 +1,12 @@
|
||||||
# Kafka + Quarkus + Docker : Demonstration
|
# Kafka + Quarkus + Docker : Demonstration
|
||||||
A small university project to discover the [Quarkus Framework](https://quarkus.io/) to build the
|
|
||||||
application combined with the [Kafka platform](https://kafka.apache.org/), the whole compatible
|
[](https://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
[](https://kotlinlang.org/)
|
||||||
|
[](https://kafka.apache.org/)
|
||||||
|
[](https://quarkus.io/)
|
||||||
|
[](https://www.docker.com/)
|
||||||
|
|
||||||
|
A small university project to discover the [Quarkus Framework](https://quarkus.io/) combined with the [Kafka library](https://kafka.apache.org/), the whole compatible
|
||||||
with [Docker](https://www.docker.com/).
|
with [Docker](https://www.docker.com/).
|
||||||
|
|
||||||
## Run
|
## Run
|
||||||
|
@ -22,7 +28,7 @@ docker compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
If wished, you can modify the configuration of the `docker-compose.yaml` file to fit your need.
|
If you wish, you can modify the configuration of the `docker-compose.yaml` file to fit your needs.
|
||||||
|
|
||||||
The container `application` can be easily modified with the following environment variables :
|
The container `application` can be easily modified with the following environment variables :
|
||||||
|
|
||||||
|
@ -30,8 +36,8 @@ The container `application` can be easily modified with the following environmen
|
||||||
|------------------------------|----------|-----------------------------------------------------|--------------------------------------------------------------------|---------------------------------------------------------------|
|
|------------------------------|----------|-----------------------------------------------------|--------------------------------------------------------------------|---------------------------------------------------------------|
|
||||||
| KAFKA_BOOTSTRAP_SERVERS | true | \<ip>[:port] | / | The Kafka server address |
|
| KAFKA_BOOTSTRAP_SERVERS | true | \<ip>[:port] | / | The Kafka server address |
|
||||||
| TOPIC_TEMPERATURE_CELSIUS | false | string of alphanumeric characters, ".", "_" and "-" | temperature-celsius | The name of the Kafka topic for the temperature in Celsius |
|
| TOPIC_TEMPERATURE_CELSIUS | false | string of alphanumeric characters, ".", "_" and "-" | temperature-celsius | The name of the Kafka topic for the temperature in Celsius |
|
||||||
| TOPIC_TEMPERATURE_FAHRENHEIT | false | string of alphanumeric characters, ".", "_" and "-" | temperature-fahrenheit | The name of the Kafka topic for the temperature in Fahrenheit | |
|
| TOPIC_TEMPERATURE_FAHRENHEIT | false | string of alphanumeric characters, ".", "_" and "-" | temperature-fahrenheit | The name of the Kafka topic for the temperature in Fahrenheit |
|
||||||
| TEMPERATURE_LOCATION | true | \<latitude>, \<longitude> | 49.9, 2.3 ([Amiens, France](https://fr.wikipedia.org/wiki/Amiens)) | The coordinates were to get the temperatures from |
|
| TEMPERATURE_LOCATION | true | \<latitude>, \<longitude> | 49.9, 2.3 ([Amiens, France](https://fr.wikipedia.org/wiki/Amiens)) | The coordinates where to get the temperatures from |
|
||||||
|
|
||||||
## Expectation
|
## Expectation
|
||||||
The `application` container shall print the current temperature at the selected place in
|
The `application` container shall print the current temperature at the selected place in
|
||||||
|
|
|
@ -9,7 +9,6 @@ import java.util.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A wrapper around KafkaAdminClient to simplify its configuration.
|
* A wrapper around KafkaAdminClient to simplify its configuration.
|
||||||
* @throws IllegalArgumentException the environment variables are not properly set.
|
|
||||||
* @param server the kafka server address
|
* @param server the kafka server address
|
||||||
* @param identifier the kafka identifier for the configuration
|
* @param identifier the kafka identifier for the configuration
|
||||||
* @see Admin
|
* @see Admin
|
||||||
|
|
|
@ -4,7 +4,6 @@ package fr.faraphel.m1_pe_kafka.kafka
|
||||||
import org.apache.kafka.clients.consumer.*
|
import org.apache.kafka.clients.consumer.*
|
||||||
import org.apache.kafka.common.serialization.DoubleDeserializer
|
import org.apache.kafka.common.serialization.DoubleDeserializer
|
||||||
import org.apache.kafka.common.serialization.StringDeserializer
|
import org.apache.kafka.common.serialization.StringDeserializer
|
||||||
import java.time.DateTimeException
|
|
||||||
|
|
||||||
import java.time.Duration
|
import java.time.Duration
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
|
@ -12,7 +11,6 @@ import java.time.ZoneId
|
||||||
import java.time.format.DateTimeFormatter
|
import java.time.format.DateTimeFormatter
|
||||||
import java.util.Collections
|
import java.util.Collections
|
||||||
import java.util.Properties
|
import java.util.Properties
|
||||||
import kotlin.time.Duration.Companion.milliseconds
|
|
||||||
import kotlin.time.Duration.Companion.seconds
|
import kotlin.time.Duration.Companion.seconds
|
||||||
import kotlin.time.toJavaDuration
|
import kotlin.time.toJavaDuration
|
||||||
|
|
||||||
|
@ -22,7 +20,6 @@ import kotlin.time.toJavaDuration
|
||||||
* @param server the kafka server address
|
* @param server the kafka server address
|
||||||
* @param topic the topic to get the records from
|
* @param topic the topic to get the records from
|
||||||
* @param identifier the kafka identifier for the configuration
|
* @param identifier the kafka identifier for the configuration
|
||||||
* @throws IllegalArgumentException the environment variables are not properly set.
|
|
||||||
*/
|
*/
|
||||||
class PrintConsumer(
|
class PrintConsumer(
|
||||||
private val server: String,
|
private val server: String,
|
||||||
|
|
Loading…
Reference in a new issue