diff --git a/akka-docs-dev/rst/java/stream-integrations.rst b/akka-docs-dev/rst/java/stream-integrations.rst index 8389fdc6b4..eaa5519886 100644 --- a/akka-docs-dev/rst/java/stream-integrations.rst +++ b/akka-docs-dev/rst/java/stream-integrations.rst @@ -37,7 +37,9 @@ stream if there is demand from downstream, otherwise they will be buffered until demand is received. Depending on the defined :class:`OverflowStrategy` it might drop elements if there is no space -available in the buffer. +available in the buffer. The strategy :class:`OverflowStrategy.backpressure()` is not supported +for this Source type, you should consider using ActorPublisher if you want a backpressured +actor interface. The stream can be completed successfully by sending ``akka.actor.PoisonPill`` or ``akka.actor.Status.Success`` to the actor reference. diff --git a/akka-docs-dev/rst/scala/stream-integrations.rst b/akka-docs-dev/rst/scala/stream-integrations.rst index 01e97a5d8a..a0c086bd2c 100644 --- a/akka-docs-dev/rst/scala/stream-integrations.rst +++ b/akka-docs-dev/rst/scala/stream-integrations.rst @@ -32,7 +32,9 @@ stream if there is demand from downstream, otherwise they will be buffered until demand is received. Depending on the defined :class:`OverflowStrategy` it might drop elements if there is no space -available in the buffer. +available in the buffer. The strategy :class:`OverflowStrategy.backpressure` is not supported +for this Source type, you should consider using ActorPublisher if you want a backpressured +actor interface. The stream can be completed successfully by sending ``akka.actor.PoisonPill`` or ``akka.actor.Status.Success`` to the actor reference. diff --git a/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala b/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala index 1cbf51ef5c..9035230538 100644 --- a/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala @@ -186,6 +186,9 @@ object Source { * Depending on the defined [[akka.stream.OverflowStrategy]] it might drop elements if * there is no space available in the buffer. * + * The strategy [[akka.stream.OverflowStrategy.backpressure]] is not supported, and an + * IllegalArgument("Backpressure overflowStrategy not supported") will be thrown if it is passed as argument. + * * The buffer can be disabled by using `bufferSize` of 0 and then received messages are dropped * if there is no demand from downstream. When `bufferSize` is 0 the `overflowStrategy` does * not matter. diff --git a/akka-stream/src/main/scala/akka/stream/scaladsl/Source.scala b/akka-stream/src/main/scala/akka/stream/scaladsl/Source.scala index ee1ffbfd16..5782e738c0 100644 --- a/akka-stream/src/main/scala/akka/stream/scaladsl/Source.scala +++ b/akka-stream/src/main/scala/akka/stream/scaladsl/Source.scala @@ -324,6 +324,9 @@ object Source extends SourceApply { * Depending on the defined [[akka.stream.OverflowStrategy]] it might drop elements if * there is no space available in the buffer. * + * The strategy [[akka.stream.OverflowStrategy.backpressure]] is not supported, and an + * IllegalArgument("Backpressure overflowStrategy not supported") will be thrown if it is passed as argument. + * * The buffer can be disabled by using `bufferSize` of 0 and then received messages are dropped * if there is no demand from downstream. When `bufferSize` is 0 the `overflowStrategy` does * not matter.