Interface SourceRef<T>


public interface SourceRef<T>
A SourceRef allows sharing a "reference" with others, with the main purpose of crossing a network boundary. Usually obtaining a SourceRef would be done via Actor messaging, in which one system asks a remote one, to share some data with it, and the remote one decides to do so in a back-pressured streaming fashion -- using a stream ref.

To create a SourceRef you have to materialize the Source that you want to obtain a reference to by attaching it to a Sink.sourceRef.

Stream refs can be seen as Reactive Streams over network boundaries. See also pekko.stream.SinkRef which is the dual of a SourceRef.

For additional configuration see reference.conf as well as pekko.stream.StreamRefAttributes.

Not for user extension.

  • Method Summary

    Modifier and Type
    Method
    Description
    Java API: Get javadsl.Source underlying to this source ref.
    Scala API: Get Source underlying to this source ref.
  • Method Details

    • source

      Source<T,NotUsed> source()
      Scala API: Get Source underlying to this source ref.
    • getSource

      Source<T,NotUsed> getSource()
      Java API: Get javadsl.Source underlying to this source ref.