diff --git a/brake-temperature/src/main/java/com/springone/braketemperature/BrakeTemperatureApplication.java b/brake-temperature/src/main/java/com/springone/braketemperature/BrakeTemperatureApplication.java index 98c0f35..5076c11 100644 --- a/brake-temperature/src/main/java/com/springone/braketemperature/BrakeTemperatureApplication.java +++ b/brake-temperature/src/main/java/com/springone/braketemperature/BrakeTemperatureApplication.java @@ -34,6 +34,7 @@ public Function, KStream(AverageBrakeTemperatureAccumulator.class))) @@ -49,6 +50,8 @@ static class AverageBrakeTemperatureAccumulator { private int count; + private String id; + private Float totalValue; private double average; @@ -73,6 +76,14 @@ public void setCount(int count) { this.count = count; } + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + public Float getTotalValue() { return totalValue; } @@ -104,5 +115,13 @@ public Date getEnd() { public void setEnd(Date end) { this.end = end; } + + @Override public String toString() { + return "Average Brake Temperature: {" + + "count=" + count + + ", id='" + id + '\'' + + ", average=" + average + + '}'; + } } } diff --git a/brake-temperature/src/main/resources/application.properties b/brake-temperature/src/main/resources/application.properties index 8b13789..597aeae 100644 --- a/brake-temperature/src/main/resources/application.properties +++ b/brake-temperature/src/main/resources/application.properties @@ -1 +1 @@ - +spring.cloud.stream.kafka.streams.binder.configuration.commit.interval.ms=1000