Search Results for

    Show / Hide Table of Contents

    Class ActorSubscriber

    Extend this actor to make it a stream subscriber with full control of stream back pressure. It will receive OnNext, OnComplete and OnError messages from the stream. It can also receive other, non-stream messages, in the same way as any actor.

    Attach the actor as a Reactive.Streams.ISubscriber<T> to the stream with Create<T>(IActorRef)

    Subclass must define the RequestStrategy to control stream back pressure. After each incoming message the ActorSubscriber will automatically invoke the RequestDemand(int) and propagate the returned demand to the stream. The provided WatermarkRequestStrategy is a good strategy if the actor performs work itself. The provided MaxInFlightRequestStrategy is useful if messages are queued internally or delegated to other actors. You can also implement a custom IRequestStrategy or call Request(long) manually together with ZeroRequestStrategy or some other strategy. In that case you must also call Request(long) when the actor is started or when it is ready, otherwise it will not receive any elements.

    Inheritance
    object
    ActorBase
    ActorSubscriber
    Implements
    IInternalActor
    Inherited Members
    ActorBase.Sender
    ActorBase.Self
    ActorBase.Context
    ActorBase.Receive(object)
    ActorBase.EmptyReceive
    ActorBase.Unhandled(object)
    ActorBase.Become(Receive)
    ActorBase.BecomeStacked(Receive)
    ActorBase.UnbecomeStacked()
    ActorBase.SetReceiveTimeout(TimeSpan?)
    ActorBase.PreStart()
    ActorBase.PreRestart(Exception, object)
    ActorBase.PostRestart(Exception)
    ActorBase.PostStop()
    ActorBase.SupervisorStrategy()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Streams.Actors
    Assembly: Akka.Streams.dll
    Syntax
    public abstract class ActorSubscriber : ActorBase, IInternalActor

    Properties

    | Edit this page View Source

    IsCanceled

    TBD

    Declaration
    public bool IsCanceled { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    RemainingRequested

    The number of stream elements that have already been requested from upstream but not yet received.

    Declaration
    protected int RemainingRequested { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    RequestStrategy

    TBD

    Declaration
    public abstract IRequestStrategy RequestStrategy { get; }
    Property Value
    Type Description
    IRequestStrategy

    Methods

    | Edit this page View Source

    AroundPostRestart(Exception, object)

    TBD

    Declaration
    public override void AroundPostRestart(Exception cause, object message)
    Parameters
    Type Name Description
    Exception cause

    TBD

    object message

    TBD

    Overrides
    ActorBase.AroundPostRestart(Exception, object)
    | Edit this page View Source

    AroundPostStop()

    TBD

    Declaration
    public override void AroundPostStop()
    Overrides
    ActorBase.AroundPostStop()
    | Edit this page View Source

    AroundPreRestart(Exception, object)

    TBD

    Declaration
    public override void AroundPreRestart(Exception cause, object message)
    Parameters
    Type Name Description
    Exception cause

    TBD

    object message

    TBD

    Overrides
    ActorBase.AroundPreRestart(Exception, object)
    | Edit this page View Source

    AroundPreStart()

    TBD

    Declaration
    public override void AroundPreStart()
    Overrides
    ActorBase.AroundPreStart()
    | Edit this page View Source

    AroundReceive(Receive, object)

    TBD

    Declaration
    protected override bool AroundReceive(Receive receive, object message)
    Parameters
    Type Name Description
    Receive receive

    TBD

    object message

    TBD

    Returns
    Type Description
    bool

    TBD

    Overrides
    ActorBase.AroundReceive(Receive, object)
    | Edit this page View Source

    Cancel()

    Cancel upstream subscription. No more elements will be delivered after cancel.

    The ActorSubscriber will be stopped immediately after signaling cancellation. In case the upstream subscription has not yet arrived the Actor will stay alive until a subscription arrives, cancel it and then stop itself.

    Declaration
    protected void Cancel()
    | Edit this page View Source

    Create<T>(IActorRef)

    Attach a ActorSubscriber actor as a Reactive.Streams.ISubscriber<T> to a Reactive.Streams.IPublisher<T> or IFlow<TOut, TMat>

    Declaration
    public static ISubscriber<T> Create<T>(IActorRef @ref)
    Parameters
    Type Name Description
    IActorRef ref

    TBD

    Returns
    Type Description
    ISubscriber<T>

    TBD

    Type Parameters
    Name Description
    T

    TBD

    | Edit this page View Source

    Request(long)

    Request a number of elements from upstream.

    Declaration
    protected void Request(long n)
    Parameters
    Type Name Description
    long n

    TBD

    Implements

    IInternalActor

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET