Fix Health indicator/partition leader issues

* Fix health indicator to properly indicate partition failure
 * Add new flag to control binder health indicator behavior
 * Regardless of the consumer that is reading from a partition, if the binder
   detects that a partition for the topic is without a leader, mark the binder
   health as DOWN (if the flag is set to true).
 * Remove synchronize block since only one thread executes the block
 * Add Docs for the new binder flag
 * Fix checkstyle issues
This commit is contained in:
cleverchuk
2020-08-21 22:56:50 -04:00
committed by Soby Chacko
parent 4161f875ed
commit 1e9aa60c4e
5 changed files with 94 additions and 39 deletions

View File

@@ -144,6 +144,11 @@ If this custom `BinderHeaderMapper` bean is not made available to the binder usi
+
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`.
[[kafka-consumer-properties]]
==== Kafka Consumer Properties