-
Hello, so I created a Uni using the RestHighLevelClients' IndexAsync function and have no problem invoking the logic, callbacks are successfully invoked -
The issue I'm experiencing is trying to use |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I'm no Elasticsearch expert, but Uni.createFrom().emitter(em -> {
Cancellable token = restHighLevelClient.updateAsync(updateRequest, DEFAULT, new ActionListener<>() {
void onResponse(Response response) {
em.complete(response);
}
void onFailure(Exception e) {
em.fail(e);
}
}
em.onTermination(() -> token.cancel());
}); On that, you can call your That said, if this is in Quarkus or Vert.x context, there's Vert.x binding for Elasticsearch high-level client (https://reactiverse.io/elasticsearch-client/) and @jponge is working on a Mutiny binding for that. That would probably be best -- once it exists :-) |
Beta Was this translation helpful? Give feedback.
-
There's work in progress for a new release of reactiverse/elasticsearch-client#11 with Mutiny bindings. |
Beta Was this translation helpful? Give feedback.
I'm no Elasticsearch expert, but
RestHighLevelClient.updateAsync
looks like a plain old callback-based API, so the easiest way to adapt that toUni
probably is:On that, you can call your
.onItem().invoke(() -> someLogic()))
.That said, if this is in Quarkus or Vert.x context, there's Vert.x binding for Elasticsearch high-level client (http…