!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
|
|
@ -41,7 +41,7 @@ class ReactiveStreamsDocSpec extends AkkaSpec {
|
|||
|
||||
val impl = new Fixture {
|
||||
override def tweets: Publisher[Tweet] =
|
||||
TwitterStreamQuickstartDocSpec.tweets.runWith(Sink.publisher)
|
||||
TwitterStreamQuickstartDocSpec.tweets.runWith(Sink.publisher(1))
|
||||
|
||||
override def storage = TestSubscriber.manualProbe[Author]
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ class ReactiveStreamsDocSpec extends AkkaSpec {
|
|||
|
||||
//#source-publisher
|
||||
val authorPublisher: Publisher[Author] =
|
||||
Source(tweets).via(authors).runWith(Sink.publisher)
|
||||
Source(tweets).via(authors).runWith(Sink.publisher(1))
|
||||
|
||||
authorPublisher.subscribe(storage)
|
||||
//#source-publisher
|
||||
|
|
@ -108,7 +108,7 @@ class ReactiveStreamsDocSpec extends AkkaSpec {
|
|||
//#source-fanoutPublisher
|
||||
val authorPublisher: Publisher[Author] =
|
||||
Source(tweets).via(authors)
|
||||
.runWith(Sink.fanoutPublisher(initialBufferSize = 8, maximumBufferSize = 16))
|
||||
.runWith(Sink.publisher(maxNumberOfSubscribers = Int.MaxValue))
|
||||
|
||||
authorPublisher.subscribe(storage)
|
||||
authorPublisher.subscribe(alert)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue