title: Spring Actuator + Kafka Streams - Add kafka stream status to health check endpoint
body: <p>I have a spring boot app where I use apache kafka-streams. I don't use spring cloud streams. I added actuator health check endpoint. I configured it in the <code>application.yml</code> like that:</p>
  
  <pre><code>management:
    health.db.enabled: false
    endpoints.web:
      base-path:
      path-mapping.health: /
  </code></pre>
  
  <p>When a runtime exception was thrown and my stream was stopped as logs show but the health check status is UP.</p>
  
  <p><code>2019-09-17 13:16:31.522 INFO 1 --- [ Thread-5] org.apache.kafka.streams.KafkaStreams : stream-client [lpp-model-stream-7e6e8fea-fcad-4033-92a4-5ede50de6e17] Streams client stopped complet</code>ely</p>
  
  <p>How to bind kafka stream status to health check endpoint  ?</p>
  
  <p>My pom.xml:  </p>
  
  <pre><code>  &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.kafka&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-kafka&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.kafka&lt;/groupId&gt;
                  &lt;artifactId&gt;kafka-streams&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;data-wizards&lt;/groupId&gt;
                  &lt;artifactId&gt;lpp-common-avro&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;io.confluent&lt;/groupId&gt;
                  &lt;artifactId&gt;kafka-streams-avro-serde&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
                  &lt;artifactId&gt;lombok&lt;/artifactId&gt;
                  &lt;scope&gt;provided&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
                  &lt;artifactId&gt;gson&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;io.vavr&lt;/groupId&gt;
                  &lt;artifactId&gt;vavr&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
  </code></pre>
  
  <p>Link to the code where I create the stream: <a href="https://gist.github.com/solveretur/fc4fdd6c7663dc4d58fe72d48029f9c3" rel="noreferrer">https://gist.github.com/solveretur/fc4fdd6c7663dc4d58fe72d48029f9c3</a></p>