!str - 18808 - Removes Sink.fanoutPublisher and makes Sink.publisher specify number of subscribers
Sink.publisher now takes a max number of Subscribers and the elasticity between concurrent Subscribers.
This commit is contained in:
parent
33444c572b
commit
f839a1f85d
54 changed files with 246 additions and 238 deletions
|
|
@ -107,8 +107,8 @@ This is how it can be used as input :class:`Source` to a :class:`Flow`:
|
|||
|
||||
.. includecode:: ../../../akka-samples/akka-docs-java-lambda/src/test/java/docs/stream/ActorPublisherDocTest.java#actor-publisher-usage
|
||||
|
||||
You can only attach one subscriber to this publisher. Use a ``Broadcast``
|
||||
element or attach a ``Sink.fanoutPublisher`` to enable multiple subscribers.
|
||||
You can only attach one subscriber to this publisher. Increase the max number of subscribers parameter or use a `Broadcast` element
|
||||
in order to support multiple subscribers.
|
||||
|
||||
ActorSubscriber
|
||||
^^^^^^^^^^^^^^^
|
||||
|
|
@ -414,18 +414,17 @@ by using the Publisher-:class:`Sink`:
|
|||
|
||||
.. includecode:: ../../../akka-samples/akka-docs-java-lambda/src/test/java/docs/stream/ReactiveStreamsDocTest.java#source-publisher
|
||||
|
||||
A publisher that is created with ``Sink.publisher`` only supports one subscriber. A second
|
||||
subscription attempt will be rejected with an :class:`IllegalStateException`.
|
||||
A publisher that is created with ``Sink.publisher`` supports a specified number of subscribers. Additional
|
||||
subscription attempts will be rejected with an :class:`IllegalStateException`.
|
||||
|
||||
A publisher that supports multiple subscribers can be created with ``Sink.fanoutPublisher``
|
||||
instead:
|
||||
A publisher that supports multiple subscribers is created as follows:
|
||||
|
||||
.. includecode:: ../../../akka-samples/akka-docs-java-lambda/src/test/java/docs/stream/ReactiveStreamsDocTest.java
|
||||
:include: author-alert-subscriber,author-storage-subscriber
|
||||
|
||||
.. includecode:: ../../../akka-samples/akka-docs-java-lambda/src/test/java/docs/stream/ReactiveStreamsDocTest.java#source-fanoutPublisher
|
||||
|
||||
The buffer size controls how far apart the slowest subscriber can be from the fastest subscriber
|
||||
The input buffer size of the stage controls how far apart the slowest subscriber can be from the fastest subscriber
|
||||
before slowing down the stream.
|
||||
|
||||
To make the picture complete, it is also possible to expose a :class:`Sink` as a :class:`Subscriber`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue