Convert spaces to tabs for pom.xml. Switch reactive dependencies to optional. Remove unused commonscollections property. Use managed versions for reactor and Spring dependencies.
Introduce WebClientProvider to avoid reinstantiation of WebClient instances. Introduce ClientConfiguration to encapsulate common Elasticsearch client configuration properties. Split ElasticsearchClients into RestClients and ReactiveRestClients to avoid mandatory dependency on WebFlux/Project Reactor. Adapt tests and code referring to WebClient creation.
Extract response body as byte array instead of Flux of DataBuffer to avoid chunking and to parse an entire response.
Encapsulate hostAndPort string used across configuration/HostProvider with InetSocketAddress. Add parser for InetSocketAddress.
Original Pull Request: #226
Initial implementation of a ReactiveElasticsearchClient using WebClient to connect to cluster nodes.
ReactiveElasticsearchClient client = ElasticsearchClients.createClient()
.connectedTo("http://localhost:9200", "http://localhost:9201")
.reactive();
A HostProvider selects active nodes and routes requests.
client.index(request ->
request.index("spring-data")
.type("elasticsearch")
.id(randomUUID().toString())
.source(singletonMap("feature", "reactive-client"))
.setRefreshPolicy(IMMEDIATE);
);
This implementation provides the first building block for reactive Template and Repository support to be added subsequently.
Along the lines we upgraded to Elasticsearch 6.5.
Original Pull Request: #226
Replace all StringUtils and ArrayUtils usages with Springframework's StringUtils and ObjectUtils. Left the commons-lang as test-scope dependency as I believe it brings some values in the tests.
Original pull request: #211.