I'm trying to migrate from the old RestHighLevelClient to the new Java API Client (v7.16.0) in a Spring Webflux project. With the old client I was able to convert the response to a Mono<> using the client's listener mechanism. The new client using CompletableFuture sounds much easier, but my IDE is warning me about an "Inappropriate blocking method call":
Has anyone run into this? Is there some non-async IO the new client is doing in addition to the work done as part of the future? Or is IntelliJ not analyzing it correctly somehow?
The async client is fully async. I tried to reproduce the warning but my IntelliJ stays silent. Do you have a specific plugin or configuration that would trigger it (I guess that should be the job of the Reactive Streams plugin).
That warning may be triggered by the fact that in 7.16 the async client methods are declared to throw an IOException. That exception is actually never thrown (because it's async) and has been removed in 7.17.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.