users@jax-rs-spec.java.net

[jax-rs-spec users] Re: Server Sent Events feedback + EDR

From: Alessio Soldano <asoldano_at_redhat.com>
Date: Wed, 15 Feb 2017 22:42:34 +0100

Il 15/02/2017 19:52, Pavel Bucek ha scritto:
> Hi Alessio,
>
> the method in your question is just another variant of:
>
> http://download.java.net/java/jdk9/docs/api/java/util/concurrent/Flow.Publisher.html#subscribe-java.util.concurrent.Flow.Subscriber-
>
>
> The subscription is meant to work same as
> Subscriber#onSubscribe(Subscription). I wanted to say that when using
> this variant of subscribe method, there is a back-pressure support and
> the subscriber can control how many messages will be received. (as
> long as there is long enough buffer, depends on the inflow). It is NOT
> meant to influence other subscribers, only callbacks registered
> "together" in the single #subscribe(...) invocation.
>
> Does it make more sense?
mmh... I'll read examples / additional doc on this for sure ;-)
It would be nice to expand the current
https://github.com/jax-rs/api/tree/master/examples/src/main/java/jaxrs/examples/sse
area with more advanced scenarios like this.


>
> I plan to re-read the javadoc and make it more clear, this is
> obviously the first adept to improve.
Thanks

Alessio