Click or drag to resize
Akka.NETSink Class
TBD
Inheritance Hierarchy
SystemObject
  Akka.Streams.DslSink

Namespace:  Akka.Streams.Dsl
Assembly:  Akka.Streams (in Akka.Streams.dll) Version: 1.2.3.42 (1.2.3.42)
Syntax
public static class Sink

The Sink type exposes the following members.

Methods
  NameDescription
Public methodStatic memberActorRefTIn
Sends the elements of the stream to the given IActorRef. If the target actor terminates the stream will be canceled. When the stream is completed successfully the given onCompleteMessage will be sent to the destination actor. When the stream is completed with failure a StatusFailure message will be sent to the destination actor. It will request at most MaxInputBufferSize number of elements from upstream, but there is no back-pressure signal from the destination actor, i.e. if the actor is not consuming the messages fast enough the mailbox of the actor will grow. For potentially slow consumer actors it is recommended to use a bounded mailbox with zero PushTimeOut or use a rate limiting stage in front of this SinkTIn, TMat.
Public methodStatic memberActorRefWithAckTIn
Sends the elements of the stream to the given IActorRef that sends back back-pressure signal. First element is always onInitMessage, then stream is waiting for acknowledgement message ackMessage from the given actor which means that it is ready to process elements.It also requires ackMessage message after each stream element to make backpressure work. If the target actor terminates the stream will be canceled. When the stream is completed successfully the given onCompleteMessage will be sent to the destination actor. When the stream is completed with failure - result of onFailureMessage function will be sent to the destination actor.
Public methodStatic memberActorSubscriberTIn
Public methodStatic memberAggregateTIn, TOut
A SinkTIn, TMat that will invoke the given aggregate function for every received element, giving it its previous output (or the given zero value) and the element as input. The returned Task will be completed with value of the final function evaluation when the input stream ends, or completed with the streams exception if there is a failure signaled in the stream.
Public methodStatic memberAggregateAsyncTIn, TOut
A SinkTIn, TMat that will invoke the given asynchronous function for every received element, giving it its previous output (or the given zero value) and the element as input. The returned Task will be completed with value of the final function evaluation when the input stream ends, or completed with "Failure" if there is a failure signaled in the stream.
Public methodStatic memberAsPublisherTIn
A SinkTIn, TMat that materializes into a IPublisher. If fanout is true, the materialized IPublisher will support multiple ISubscriber`s and the size of the MaxInputBufferSize configured for this stage becomes the maximum number of elements that the fastest ISubscriber can be ahead of the slowest one before slowing the processing down due to back pressure. If fanout is false then the materialized IPublisher will only support a single ISubscriber and reject any additional ISubscriber`s.
Public methodStatic memberCancelledTIn
Public methodStatic memberCombineTIn, TOut, TMat
Public methodStatic memberCreateTIn
Public methodStatic memberFanoutPublisherTIn
Public methodStatic memberFirstTIn
A SinkTIn, TMat that materializes into a TaskTResult of the first value received. If the stream completes before signaling at least a single element, the Task will be failed with a NoSuchElementException. If the stream signals an error before signaling at least a single element, the Task will be failed with the streams exception.
Public methodStatic memberFirstOrDefaultTIn
A SinkTIn, TMat that materializes into a TaskTResult of the first value received. If the stream completes before signaling at least a single element, the Task will return default value. If the stream signals an error errors before signaling at least a single element, the Task will be failed with the streams exception.
Public methodStatic memberForEachTIn
A SinkTIn, TMat that will invoke the given action for each received element. The sink is materialized into a Task will be completed with success when reaching the normal end of the stream, or completed with a failure if there is a failure signaled in the stream..
Public methodStatic memberForEachParallelTIn
A SinkTIn, TMat that will invoke the given action to each of the elements as they pass in. The sink is materialized into a Task. If the action throws an exception and the supervision decision is Stop the Task will be completed with failure. If the action throws an exception and the supervision decision is Resume or Restart the element is dropped and the stream continues.

See also

Public methodStatic memberFromGraphTIn, TMat
A graph with the shape of a sink logically is a sink, this method makes it so also in type.
Public methodStatic memberFromSubscriberTIn
Public methodStatic memberIgnoreTIn
Public methodStatic memberLastTIn
A SinkTIn, TMat that materializes into a TaskTResult of the last value received. If the stream completes before signaling at least a single element, the Task will be failed with a NoSuchElementException. If the stream signals an error errors before signaling at least a single element, the Task will be failed with the streams exception.
Public methodStatic memberLastOrDefaultTIn
A SinkTIn, TMat that materializes into a TaskTResult of the last value received. If the stream completes before signaling at least a single element, the Task will be return a default value. If the stream signals an error errors before signaling at least a single element, the Task will be failed with the streams exception.
Public methodStatic memberLazySinkTIn, TMat
Creates a real SinkTIn, TMat upon receiving the first element. Internal SinkTIn, TMat will not be created if there are no elements, because of completion or error. If sinkFactory throws an exception and the supervision decision is Stop the Task will be completed with failure. For all other supervision options it will try to create sink with next element. fallback will be executed when there was no elements and completed is received from upstream.
Public methodStatic memberOnCompleteTIn
A SinkTIn, TMat that when the flow is completed, either through a failure or normal completion, apply the provided function with success or failure.
Public methodStatic memberPublisherTIn
Public methodStatic memberQueueTIn

Creates a SinkTIn, TMat that is materialized as an ISinkQueueT. PullAsync method is pulling element from the stream and returns TaskTResult. Task completes when element is available.

Before calling the pull method a second time you need to wait until previous future completes. Pull returns failed future with IllegalStateException if previous future has not yet completed.

SinkTIn, TMat will request at most number of elements equal to size of inputBuffer from upstream and then stop back pressure. You can configure size of input by using WithAttributes method.

For stream completion you need to pull all elements from ISinkQueueT including last None as completion marker.

Public methodStatic memberSeqTIn
TBD
Public methodStatic memberShapeT
TBD
Public methodStatic memberSumTIn
A SinkTIn, TMat that will invoke the given reduce for every received element, giving it its previous output (from the second element) and the element as input. The returned TaskTResult will be completed with value of the final function evaluation when the input stream ends, or completed with `Failure` if there is a failure signaled in the stream. If the stream is empty (i.e. completes before signaling any elements), the sum stage will fail its downstream with a NoSuchElementException, which is semantically in-line with that standard library collections do in such situations.
Public methodStatic memberWrapTIn, TMat
A graph with the shape of a sink logically is a sink, this method makes it so also in type.
Top
See Also