Using binders health indicator
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Tue, 31 Jan 2017 21:14:37 +0000 (22:14 +0100)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Tue, 31 Jan 2017 21:14:37 +0000 (22:14 +0100)
SpringJava/Kafka/SpringCloudStream/README

index 876ab4b..81733af 100644 (file)
@@ -25,3 +25,28 @@ The best you can do for debugging spring boot applications is running from conso
 java -jar -Djaxp.debug=1 -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n target/spring-cloud-stream-kafka-consumer-example-1.0-SNAPSHOT.jar
 
 And then you must use the remote debugging option from Eclipse/IntelliJ
+
+
+5. Consumer with health indicator:
+   http://docs.spring.io/spring-cloud-stream/docs/current/reference/html/_health_indicator.html
+
+   You can retrieve information from this URL (do not forget you must comment out the web-environment property in application.yml of spring-stream-kafka-consumer):
+   GET http://localhost:8080/health
+   {
+        "status": "UP",
+        "diskSpace": {
+            "status": "UP",
+            "total": 39235076096,
+            "free": 23638888448,
+            "threshold": 10485760
+        },
+        "binders": {
+            "status": "UP",
+            "kafka": {
+                "status": "UP",
+                "healthIndicator": {
+                    "status": "UP"
+                }
+            }
+        }
+    }