Topic
Asynchronous Topic.
Topic allows you to distribute
A
published by arbitrary number of publishers to arbitrary number of subscribers.Topic has built-in back-pressure support implemented as maximum bound (
Once that bound is hit, publishing may semantically block until the lagging subscriber consumes some of its queued elements.
maxQueued
) that a subscriber is allowed to enqueue.Once that bound is hit, publishing may semantically block until the lagging subscriber consumes some of its queued elements.
Additionally the subscriber has possibility to terminate whenever size of enqueued elements is over certain size
by using
by using
subscribeSize
.- Companion
- object
class Object
trait Matchable
class Any
Value members
Methods
Publishes elements from source of
Pipe equivalent of
A
to this topic and emits a unit for each element published.Pipe equivalent of
publish1
.Publishes one
A
to topic.This waits until
If any of the subscribers is over the
enough of its elements such that
a
is published to all subscribers.If any of the subscribers is over the
maxQueued
limit, this will wait to complete until that subscriber processesenough of its elements such that
a
is enqueued.Subscribes for
A
values that are published to this topic.Pulling on the returned stream opens a "subscription", which allows up to
maxQueued
elements to be enqueued as a result of publication.The first element in the stream is always the last published
the stream is first pulled from, followed by each published
point forward.
A
at the timethe stream is first pulled from, followed by each published
A
value from thatpoint forward.
If at any point, the queue backing the subscription has
any further publications semantically block until elements are dequeued from the
subscription queue.
maxQueued
elements in it,any further publications semantically block until elements are dequeued from the
subscription queue.
- Value Params
- maxQueued
-
maximum number of elements to enqueue to the subscription
queue before blocking publishers
Like subscribe but emits an approximate number of queued elements for this subscription
with each emitted
with each emitted
A
value.