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-05-29 17:00:48 +09:00
|
|
|
@ref[Sink operators](../index.md#sink-operators)
|
2018-04-18 11:44:37 +02:00
|
|
|
|
2018-04-18 10:26:53 +02:00
|
|
|
## Signature
|
|
|
|
|
|
2020-04-30 08:59:22 +02:00
|
|
|
@apidoc[Sink.queue](Sink$) { scala="#queue[T](maxConcurrentPulls:Int):akka.stream.scaladsl.Sink[T,akka.stream.scaladsl.SinkQueueWithCancel[T]]" java="#queue(int)" }
|
2018-04-18 11:44:37 +02:00
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
@@@
|
|
|
|
|
|