see gh-2652
Please let me know if I need something to document.
Comment From: nosan
Thank you very much @snicoll
PR has been updated.
I believe it is what you are expecting.
Comment From: nosan
From another point of view, maybe it makes sense to introduce HealthIndicatorStrategy
interface.
For now, it could be two different implementations:
- DefaultHealthIndicatorStrategy
- returns health indications from all HealthIndicators
sequentially
- ConcurrentHealthIndicatorStrategy
- returns health indications from all HealthIndicators
concurrently
Update CompositeHealthIndicator
to use HealthIndicatorStrategy
to collect health results and finally expose HealthIndicatorStrategy
as a bean.
Comment From: nosan
@snicoll There are 2 approaches: - https://github.com/spring-projects/spring-boot/pull/17617/commits/9344765f2e27c115a05639d76c072f6aca379be8 - https://github.com/spring-projects/spring-boot/pull/17617/commits/e59b517ca6371f6ca036c15699ee5ca73b9b03a1
- Update
CompositeHealthIndicator
with new methodsparallel
andsequential
to configure a strategy that should be used. Is not possible to define your own strategy at all. There is no way to configure strategy via bean. - Update
CompositeHealthIndicator
to useHealthIndicatorStrategy
. Currently, I've added two strategiesConcurrentlyHealthIndicatorStrategy
andDefaultHealthIndicatorStrategy
. Easy to define your own strategy. Strategy can be registered as a bean.
Please let me know what you think. Thanks in advance.
Comment From: snicoll
@nosan there was a major refactoring of the health support this week. Would you be interested to revisit your original proposal against master
?
Comment From: nosan
@snicoll sure, but I need some time to check this out.
Comment From: nosan
@snicoll I'm closing this for now, as I need more time than I have expected. Sorry for the inconvenience and thank you for your time.
Comment From: snicoll
No need to apologize @nosan and thank you for the feedback.