KafkaBinderHealthIndicator Changes

- Set considerDownWhenAnyPartitionHasNoLeader to true by default

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2760
This commit is contained in:
Soby Chacko
2023-09-08 14:51:14 -04:00
parent bec40fba89
commit 26597db5b0
3 changed files with 5 additions and 3 deletions

View File

@@ -55,7 +55,9 @@ public abstract class AbstractKafkaBinderHealthIndicator extends AbstractHealthI
protected Consumer<?, ?> metadataConsumer;
protected boolean considerDownWhenAnyPartitionHasNoLeader;
// if the binder detects that a partition for the topic
// is without a leader, mark the binder health as DOWN.
protected boolean considerDownWhenAnyPartitionHasNoLeader = true;
private final ConsumerFactory<?, ?> consumerFactory;

View File

@@ -102,7 +102,7 @@ public class KafkaBinderConfigurationProperties {
private boolean autoAddPartitions;
private boolean considerDownWhenAnyPartitionHasNoLeader;
private boolean considerDownWhenAnyPartitionHasNoLeader = true;
private String requiredAcks = "1";

View File

@@ -148,7 +148,7 @@ Default: none.
spring.cloud.stream.kafka.binder.considerDownWhenAnyPartitionHasNoLeader::
Flag to set the binder health as `down`, when any partitions on the topic, regardless of the consumer that is receiving data from it, is found without a leader.
+
Default: `false`.
Default: `true`.
spring.cloud.stream.kafka.binder.certificateStoreDirectory::
When the truststore or keystore certificate location is given as a non-local file system resource (resources supported by org.springframework.core.io.Resource e.g. CLASSPATH, HTTP, etc.),