From b1ed747b113fd98f429bf22683f39ee7c161f921 Mon Sep 17 00:00:00 2001 From: Michael Simons Date: Thu, 4 May 2023 11:22:51 +0200 Subject: [PATCH] Change return type to Mutiny Multi, standard Flow.Publisher has issues See https://github.com/quarkusio/quarkus/issues/33106. --- docs/modules/ROOT/pages/includes/attributes.adoc | 2 +- .../main/java/io/quarkus/it/neo4j/ReactiveFruitResource.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/modules/ROOT/pages/includes/attributes.adoc b/docs/modules/ROOT/pages/includes/attributes.adoc index acbf573..bab96dc 100644 --- a/docs/modules/ROOT/pages/includes/attributes.adoc +++ b/docs/modules/ROOT/pages/includes/attributes.adoc @@ -1,4 +1,4 @@ -:quarkus-version: 3.0.0.Final +:quarkus-version: 3.0.2.Final :quarkus-neo4j-version: 3.0.0 :maven-version: 3.8.1+ diff --git a/integration-tests/src/main/java/io/quarkus/it/neo4j/ReactiveFruitResource.java b/integration-tests/src/main/java/io/quarkus/it/neo4j/ReactiveFruitResource.java index c94907c..3d21509 100644 --- a/integration-tests/src/main/java/io/quarkus/it/neo4j/ReactiveFruitResource.java +++ b/integration-tests/src/main/java/io/quarkus/it/neo4j/ReactiveFruitResource.java @@ -2,7 +2,6 @@ package io.quarkus.it.neo4j; import java.util.Map; -import java.util.concurrent.Flow; import jakarta.inject.Inject; import jakarta.ws.rs.Consumes; @@ -33,7 +32,7 @@ static Uni sessionFinalizer(ReactiveSession session) { // <.> @GET @Produces(MediaType.SERVER_SENT_EVENTS) - public Flow.Publisher get() { + public Multi get() { // Create a stream from a resource we can close in a finalizer... return Multi.createFrom().resource(() -> driver.session(ReactiveSession.class), // <.> session -> session.executeRead(tx -> { @@ -60,6 +59,7 @@ public Uni create(Fruit fruit) { })) .withFinalizer(ReactiveFruitResource::sessionFinalizer) .map(record -> Fruit.from(record.get("f").asNode())) + .toUni() .subscribe().with( // <.> persistedFruit -> e.complete("/fruits/" + persistedFruit.id))); }