-
Notifications
You must be signed in to change notification settings - Fork 374
Closed
Description
Jersey MP Rest client SseEventPublisher uses SubmissionPublisher internally with PublisherStrategy.BEST_EFFORT and it's SubmissionPublisher#offer method for non-blocking submission.
This makes it non compliant with Reactive Streams for JVM TCK.
Problem this that ignoring backpressure and relying on "Slow subscriber" error is outside the Reactive Streams for JVM spec and because of that also makes it non compliant with MicroProfile REST Client TCK.
All that should be done is to actually propagate back-pressure by oldschool blocking:
diff --git a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/SseEventPublisher.java b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/SseEventPublisher.java
--- a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/SseEventPublisher.java (revision 8a63706db096dcadd0e13195515c56b9cb394279)
+++ b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/SseEventPublisher.java (date 1695803963089)
@@ -66,7 +66,7 @@
this.executor = executor;
this.genericType = genericType;
- this.publisher = new JerseyPublisher<>(executor::submit, JerseyPublisher.PublisherStrategy.BEST_EFFORT);
+ this.publisher = new JerseyPublisher<>(executor::submit, JerseyPublisher.PublisherStrategy.BLOCKING);
}
private static final Logger LOG = Logger.getLogger(SseEventPublisher.class.getName());
This is a probable root-cause of helidon-io/helidon/issues/5083
Metadata
Metadata
Assignees
Labels
No labels