Adding some more details on these issues:
Retries
Retry policies are often quite application-specific. Although we my add retries for some common errors such connection errors, other errors will require an application-level policy to determine if they should be retried, and how (i.e. delays, number of retries, etc).
Although we may add it in a future release, when and how isn't defined yet. In the meantime, there are a number of well-known retry libraries surch as Spring Retry or Failsafe that can do a great job and offer much more flexibility than what we will ultimately include in the client library.
Reactive API
The Java client comes in two flavors: ElasticsearchClient
which is blocking, and ElasticsearchAsyncClient
which is asynchronous. A Future
can easily be wrapped in a Mono
so there's no need for a reactive API for asynchronous calls that return a single result.
Where a reactive API is useful though is for bulk ingestion. The current BulkIngester
implements back pressure by blocking callers. A reactive implementation would then be a Subscriber
of bulk operations.
The java.util.concurrent.Flow
API is only available in Java 9+ while the baseline for the Java client is currently Java 8. In the next major version of the Elastic Stack (currently planned for Q2 2025) we will change the baseline to Java 11, which will unlock a number of features, including a reactive implementation of the Bulk Ingester.
Kotlin
As mentioned, we plan to experiment around a Kotlin client. However, this is just an experiment, and there are no plans for a Kotlin-native client, which would be a significant engineering effort.
That being said, the current Java client can be used in Kotlin in an "almost DSL" way with a with(it)
trick. Here's an example showing how to create a search request:
val req = SearchRequest.of { with(it) {
q("foo")
from(1)
pit {
it.id("bar")
}
}}
Better time/duration values
This one will lead to breaking changes in the Java client API, and is planned for version 9, unless we find some tricks to avoid breaking the current API.