SafeSubscriber

final class SafeSubscriber[-A] extends Subscriber[A]

A safe subscriber safe guards subscriber implementations, such that:

A safe subscriber safe guards subscriber implementations, such that:

  • the onComplete and onError signals are back-pressured
  • errors triggered by downstream observers are caught and logged, while the upstream gets an Ack.Stop, to stop sending events
  • once an onError or onComplete was emitted, the observer no longer accepts onNext events, ensuring that the grammar is respected
  • if downstream signals a Stop, the observer no longer accepts any events, ensuring that the grammar is respected
Companion
object
trait Subscriber[A]
trait Observer[A]
trait Serializable
class Object
trait Matchable
class Any

Value members

Concrete methods

def onComplete(): Unit
def onError(ex: Throwable): Unit
def onNext(elem: A): Future[Ack]

Implicits

Implicits

implicit val scheduler: Scheduler