Compare commits

...

5 Commits

Author SHA1 Message Date
bvn13 9ee98e5446 Update for next development version 2022-06-30 11:36:10 +03:00
bvn13 58b33cb8d9 Merge tag '1.5.4' into develop
Tag release
2022-06-30 11:36:05 +03:00
bvn13 bb51848708 Merge branch 'release/1.5.4' 2022-06-30 11:36:05 +03:00
bvn13 ec804bb9f8 Update versions for release 2022-06-30 11:35:39 +03:00
bvn13 432f8627c9 added feature toggling for enabling/disabling 2022-06-30 11:35:28 +03:00
3 changed files with 11 additions and 8 deletions

View File

@ -12,7 +12,7 @@ Add the following dependency to your `pom.xml`
<dependency>
<groupId>me.bvn13.kafka.health</groupId>
<artifactId>kafka-health-check</artifactId>
<version>1.5.0</version>
<version>1.5.4</version>
</dependency>
```
@ -66,12 +66,13 @@ Now if you call the actuator endpoint `actuator/health` you should see the follo
## Configuration
| Property | Default | Description |
|------------------------------------|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| kafka.health.topic | `health-checks` | Topic to subscribe to |
| kafka.health.sendReceiveTimeout | 2.5s | The maximum time, given as [Duration](https://docs.spring.io/spring-boot/docs/2.1.9.RELEASE/reference/html/boot-features-external-config.html#boot-features-external-config-conversion-duration), to wait for sending and receiving the message. |
| kafka.health.pollTimeout | 200ms | The time, given as [Duration](https://docs.spring.io/spring-boot/docs/2.1.9.RELEASE/reference/html/boot-features-external-config.html#boot-features-external-config-conversion-duration), spent fetching the data from the topic |
| kafka.health.cache.maximumSize | 200 | Specifies the maximum number of entries the cache may contain. |
| Property | Default | Description |
|---------------------------------|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| kafka.health.enabled | false | Enabling kafka health check |
| kafka.health.topic | `health-checks` | Topic to subscribe to |
| kafka.health.sendReceiveTimeout | 2.5s | The maximum time, given as [Duration](https://docs.spring.io/spring-boot/docs/2.1.9.RELEASE/reference/html/boot-features-external-config.html#boot-features-external-config-conversion-duration), to wait for sending and receiving the message.|
| kafka.health.pollTimeout | 200ms | The time, given as [Duration](https://docs.spring.io/spring-boot/docs/2.1.9.RELEASE/reference/html/boot-features-external-config.html#boot-features-external-config-conversion-duration), spent fetching the data from the topic |
| kafka.health.cache.maximumSize | 200 | Specifies the maximum number of entries the cache may contain. |

View File

@ -6,7 +6,7 @@
<groupId>me.bvn13.kafka.health</groupId>
<artifactId>kafka-health-check</artifactId>
<version>1.5.4-SNAPSHOT</version>
<version>1.5.5-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Kafka Health Check</name>

View File

@ -3,6 +3,7 @@ package me.bvn13.kafka.health;
import org.springframework.boot.actuate.health.AbstractHealthIndicator;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.kafka.KafkaProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
@ -10,6 +11,7 @@ import org.springframework.context.annotation.Configuration;
@Configuration
@ConditionalOnClass(AbstractHealthIndicator.class)
//@ConditionalOnProperty(name = "kafka.health.enabled", havingValue = "true")
public class KafkaHealthAutoConfiguration {
@Bean