A RestClientBuilder bean is not defined when RestHighLevelClient is unavailable#28655
A RestClientBuilder bean is not defined when RestHighLevelClient is unavailable#28655filiphr wants to merge 1 commit intospring-projects:mainfrom
Conversation
|
|
||
| private final JsonParser jsonParser; | ||
| @Deprecated | ||
| public class ElasticsearchRestHealthIndicator extends ElasticsearchRestClientHealthIndicator { |
There was a problem hiding this comment.
I really wanted to avoid deprecating this. However, it is not possible to use this class when the RestHighLevelClient is not available.
ae70e33 to
a4dd7fc
Compare
a4dd7fc to
012da61
Compare
This commits exposes the RestClientBuilder as a bean even when the RestHighLevelClient is not available It allows users to create their own RestClient beans using the Spring Boot configured RestClientBuilder when they are not using the RestHighLevelClient. In addition to that a new ElasticsearchRestClientHealthIndicator decoupled from the RestHighLevelClient has been added and is used as an elasticsearch health contributor when there are no RestHighLevelClient beans.
012da61 to
5db6e6f
Compare
|
@filiphr I've merged this PR, removing the bits about the health indicators. I know this won't solve everything on your side, but I hope it will make things a bit easier for the 2.6.x timeline. |
|
Thanks a lot for bringing this into the 2.6.x timeline @bclozel. It helps us a lot to properly use the Spring Boot support here.
I completely understand this. I was not entirely sure about it left it there to leave it up to you. Adding our own health contributor is super trivial. Does the change about the health contributors make sense for the 2.7 release? If yes I will bring those changes to PR #28496 |
This commits exposes the RestClientBuilder as a bean even when the RestHighLevelClient is not available
It allows users to create their own RestClient beans using the Spring Boot configured RestClientBuilder
when they are not using the RestHighLevelClient.
In addition to that a new ElasticsearchRestClientHealthIndicator decoupled from the RestHighLevelClient has been added
and is used as an elasticsearch health contributor when there are no RestHighLevelClient beans.
This is similar to PR #28496, with the difference being that this is a potential proposal for 2.6.0. With this people can freely remove the dependency on the
RestHighLevelClientand have all the benefits from Spring Boot in 2.6.