Skip to content

Commit

Permalink
Change return type to Mutiny Multi, standard Flow.Publisher has issues
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-simons committed May 4, 2023
1 parent 0d463db commit b1ed747
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/includes/attributes.adoc
Original file line number Diff line number Diff line change
@@ -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+

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -33,7 +32,7 @@ static Uni<Void> sessionFinalizer(ReactiveSession session) { // <.>

@GET
@Produces(MediaType.SERVER_SENT_EVENTS)
public Flow.Publisher<String> get() {
public Multi<String> 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 -> {
Expand All @@ -60,6 +59,7 @@ public Uni<String> create(Fruit fruit) {
}))
.withFinalizer(ReactiveFruitResource::sessionFinalizer)
.map(record -> Fruit.from(record.get("f").asNode()))
.toUni()
.subscribe().with( // <.>
persistedFruit -> e.complete("/fruits/" + persistedFruit.id)));
}
Expand Down

0 comments on commit b1ed747

Please sign in to comment.