Merge der überarbeiteten Compose-Konfiguration ('stored-state')
[demos/kafka/training] / src / main / java / de / juplo / kafka / DriverController.java
index a02fd2c..1fb2a1b 100644 (file)
@@ -3,10 +3,12 @@ package de.juplo.kafka;
 import lombok.RequiredArgsConstructor;
 import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.ResponseStatus;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Map;
 import java.util.concurrent.ExecutionException;
 
 
@@ -29,6 +31,14 @@ public class DriverController
     consumer.stop();
   }
 
+
+  @GetMapping("seen")
+  public Map<Integer, Map<String, Integer>> seen()
+  {
+    return consumer.getSeen();
+  }
+
+
   @ExceptionHandler
   @ResponseStatus(HttpStatus.BAD_REQUEST)
   public ErrorResponse illegalStateException(IllegalStateException e)