Skip to content

Conversation

swallez
Copy link
Member

@swallez swallez commented May 25, 2023

Extract the logic related to high-level API objects (serialization, deserialization, error handling, etc) that exists in RestClientTransport to a new abstract ElasticsearchTransportBase class. This class delegates http processing to implementations of a new TransportHttpClient interface.

The goal is to allow additional implementations to be provided, such as one based on the builtin http client in JDK11+, and allow users to easily implement their own when needed. The new example-transports sub-project contains an example implementation that uses Netty.

Note that ElasticsearchTransportBase does not implement multi-node retry and cluster sniffing, which is provided by RestClient and would have to be re-implemented for other http libraries.

Fixes #550

@swallez swallez added the Category: Enhancement New feature or request label May 25, 2023
@swallez swallez marked this pull request as ready for review June 13, 2023 15:20
@swallez swallez changed the title [WIP] Extract base abstract behavior from RestClientTransport Refactor RestClientTransport to allow using other http client libraries Jun 13, 2023
@swallez swallez merged commit 4c3a13b into main Jun 13, 2023
@swallez swallez deleted the refactor-transport branch June 13, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Enhancement New feature or request
1 participant