Compare commits

...

39 Commits

Author SHA1 Message Date
bvn13 167360566a Update for next development version 2022-06-30 12:07:02 +03:00
bvn13 8701dcbc0f Merge tag '1.5.5' into develop
Tag release
2022-06-30 12:06:59 +03:00
bvn13 f701f1c27d Merge branch 'release/1.5.5' 2022-06-30 12:06:58 +03:00
bvn13 7385f3a4cd Update versions for release 2022-06-30 12:06:33 +03:00
bvn13 0bcfa5ddb0 added feature toggling for enabling/disabling 2022-06-30 12:06:07 +03:00
bvn13 9ee98e5446 Update for next development version 2022-06-30 11:36:10 +03:00
bvn13 bb51848708 Merge branch 'release/1.5.4' 2022-06-30 11:36:05 +03:00
bvn13 58b33cb8d9 Merge tag '1.5.4' into develop
Tag release
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
bvn13 18b3754075 updated changelog 2022-06-28 22:27:19 +03:00
bvn13 7478766182 Update for next development version 2022-06-28 21:46:09 +03:00
bvn13 bf394419cf Merge branch 'release/1.5.3' 2022-06-28 21:46:04 +03:00
bvn13 6156326222 Merge tag '1.5.3' into develop
Tag release
2022-06-28 21:46:04 +03:00
bvn13 cc56c30401 Update versions for release 2022-06-28 21:45:48 +03:00
bvn13 1cb2c91dba #11 - added SpringBootAutoConfiguration 2022-06-28 21:45:19 +03:00
bvn13 96c9a2d891 Update for next development version 2022-06-28 17:38:54 +03:00
bvn13 82448723b5 Merge branch 'release/1.5.2' 2022-06-28 17:38:52 +03:00
bvn13 56722ca245 Merge tag '1.5.2' into develop
Tag release
2022-06-28 17:38:52 +03:00
bvn13 9a69e42811 updates for releasing 2022-06-28 17:38:02 +03:00
bvn13 1eff984e5c Merge branch 'release/1.5.1' 2022-06-28 17:37:35 +03:00
bvn13 cb8f660164 updates for releasing 2022-06-28 17:37:13 +03:00
bvn13 d1b7ec0256 updates for releasing 2022-06-28 17:34:49 +03:00
bvn13 bdb8c3b5a6 Update for next development version 2022-06-28 17:33:09 +03:00
bvn13 2be895f054 Merge branch 'release/1.5.0' 2022-06-28 17:33:07 +03:00
bvn13 52ffc309d7 Merge tag '1.5.0' into develop
Tag release
2022-06-28 17:33:07 +03:00
bvn13 28c5d7e8fb updates for releasing 2022-06-28 17:32:18 +03:00
bvn13 dcac43aeaa Update for next development version 2022-06-28 16:08:58 +03:00
bvn13 80eb5223ce Merge branch 'release/1.6.1' 2022-06-28 16:08:54 +03:00
bvn13 b68940bcd1 Merge tag '1.6.1' into develop
Tag release
2022-06-28 16:08:54 +03:00
bvn13 0e4c8fc8b7 updates for releasing 2022-06-28 16:08:25 +03:00
bvn13 35d3b270c9 updates for releasing 2022-06-28 16:05:34 +03:00
bvn13 a2ae1a0d65 Update for next development version 2022-06-28 15:37:41 +03:00
bvn13 8e55087b49 Merge branch 'release/1.5.1' into develop 2022-06-28 15:37:39 +03:00
bvn13 15057c321b Merge branch 'release/1.5.1' 2022-06-28 15:37:38 +03:00
bvn13 5985805836 Update versions for release 2022-06-28 15:37:24 +03:00
bvn13 fc4b77c0e7 updates for releasing 2022-06-28 15:37:05 +03:00
bvn13 0833746ead Update for next development version 2022-06-28 10:47:21 +03:00
bvn13 8e1d15413f Merge branch 'release/1.4.2' into develop 2022-06-28 10:47:18 +03:00
5 changed files with 79 additions and 15 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.4.0</version>
<version>1.5.5</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

@ -1,9 +1,16 @@
# KafkaHealthCheck
## Version 1.5.3
* Added SpringBootAutoConfiguration
## Version 1.5.2
* Changed maven group publication: switched into `me.bvn13.kafka.health`
## Version 1.4.0
* Got rid of `subscriptionTimeout` as a redundant timeout
* Changed maven group publication: switched into `me.bvn13.kafka.health`
## Version 1.3.0

37
pom.xml
View File

@ -6,7 +6,7 @@
<groupId>me.bvn13.kafka.health</groupId>
<artifactId>kafka-health-check</artifactId>
<version>1.4.2</version>
<version>1.5.6-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Kafka Health Check</name>
@ -30,11 +30,12 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Versions -->
<nexus.url>https://s01.oss.sonatype.org</nexus.url>
<guava.version>30.1.1-jre</guava.version>
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<gitflow-maven-plugin.version>1.15.1</gitflow-maven-plugin.version>
<gitflow-maven-plugin.version>1.18.0</gitflow-maven-plugin.version>
</properties>
<dependencies>
@ -113,7 +114,8 @@
<gitFlowConfig>
<developmentBranch>develop</developmentBranch>
</gitFlowConfig>
<versionDigitToIncrement>1</versionDigitToIncrement>
<incrementVersionAtFinish>true</incrementVersionAtFinish>
<versionDigitToIncrement>2</versionDigitToIncrement>
</configuration>
</plugin>
</plugins>
@ -196,14 +198,31 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<nexusUrl>${nexus.url}</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
@ -227,8 +246,12 @@
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
<url>${nexus.url}/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>${nexus.url}/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<pluginRepositories>

View File

@ -0,0 +1,32 @@
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;
import org.springframework.context.annotation.Configuration;
@Configuration
@ConditionalOnClass(AbstractHealthIndicator.class)
@ConditionalOnProperty(name = "kafka.health.enabled", havingValue = "true")
public class KafkaHealthAutoConfiguration {
@Bean
@ConditionalOnMissingBean(KafkaHealthProperties.class)
@ConfigurationProperties("kafka.health")
public KafkaHealthProperties kafkaHealthProperties() {
return new KafkaHealthProperties();
}
@Bean
@ConditionalOnMissingBean(KafkaConsumingHealthIndicator.class)
public KafkaConsumingHealthIndicator kafkaConsumingHealthIndicator(KafkaHealthProperties kafkaHealthProperties,
KafkaProperties kafkaProperties) {
return new KafkaConsumingHealthIndicator(kafkaHealthProperties, kafkaProperties.buildConsumerProperties(),
kafkaProperties.buildProducerProperties());
}
}

View File

@ -0,0 +1 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=me.bvn13.kafka.health.KafkaHealthAutoConfiguration