-
Notifications
You must be signed in to change notification settings - Fork 40.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A RestClientBuilder bean is not defined when RestHighLevelClient is unavailable #28655
Conversation
|
||
private final JsonParser jsonParser; | ||
@Deprecated | ||
public class ElasticsearchRestHealthIndicator extends ElasticsearchRestClientHealthIndicator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
RestHighLevelClient
and have all the benefits from Spring Boot in 2.6.