2018-04-18 11:44:37 +02:00
|
|
|
# Sink.queue
|
2018-04-18 10:26:53 +02:00
|
|
|
|
|
|
|
|
Materialize a `SinkQueue` that can be pulled to trigger demand through the sink.
|
|
|
|
|
|
2018-04-18 11:44:37 +02:00
|
|
|
@ref[Sink stages](../index.md#sink-stages)
|
|
|
|
|
|
|
|
|
|
@@@div { .group-scala }
|
|
|
|
|
|
2018-04-18 10:26:53 +02:00
|
|
|
## Signature
|
|
|
|
|
|
2018-04-18 11:44:37 +02:00
|
|
|
@@signature [Sink.scala]($akka$/akka-stream/src/main/scala/akka/stream/scaladsl/Sink.scala) { #queue }
|
|
|
|
|
|
|
|
|
|
@@@
|
|
|
|
|
|
2018-04-18 10:26:53 +02:00
|
|
|
## Description
|
|
|
|
|
|
|
|
|
|
Materialize a `SinkQueue` that can be pulled to trigger demand through the sink. The queue contains
|
|
|
|
|
a buffer in case stream emitting elements faster than queue pulling them.
|
|
|
|
|
|
|
|
|
|
|
2018-05-22 18:27:54 +09:00
|
|
|
## Reactive Streams semantics
|
|
|
|
|
|
|
|
|
|
|
2018-04-18 10:26:53 +02:00
|
|
|
@@@div { .callout }
|
|
|
|
|
|
|
|
|
|
**cancels** when `SinkQueue.cancel` is called
|
|
|
|
|
|
|
|
|
|
**backpressures** when buffer has some space
|
|
|
|
|
|
|
|
|
|
@@@
|
|
|
|
|
|