CompleteStage

org.apache.pekko.stream.Attributes.CancellationStrategy.CompleteStage
@ApiMayChange
case object CompleteStage extends Strategy

Strategy that treats cancelStage the same as completeStage, i.e. all inlets are cancelled (propagating the cancellation cause) and all outlets are regularly completed.

This used to be the default behavior before Akka 2.6.

This behavior can be problematic in stacks of BidiFlows where different layers of the stack are both connected through inputs and outputs. In this case, an error in a doubly connected component triggers both a cancellation going upstream and an error going downstream. Since the stack might be connected to those components with inlets and outlets, a race starts whether the cancellation or the error arrives first. If the error arrives first, that's usually good because then the error can be propagated both on inlets and outlets. However, if the cancellation arrives first, the previous default behavior to complete the stage will lead other outputs to be completed regularly. The error which arrive late at the other hand will just be ignored (that connection will have been cancelled already and also the paths through which the error could propagates are already shut down).

Attributes

Source
Attributes.scala
Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Strategy
class Object
trait Matchable
class Any
Show all
Self type

Members list

Type members

Inherited types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Singleton
Source
Mirror.scala

Attributes

Inherited from:
Singleton
Source
Mirror.scala

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredMonoType = Singleton.this.type

The mirrored *-type

The mirrored *-type

Attributes

Inherited from:
Singleton
Source
Mirror.scala
type MirroredType = Singleton.this.type

Attributes

Inherited from:
Singleton
Source
Mirror.scala

Value members

Inherited methods

Create a new instance of type T with elements taken from product p.

Create a new instance of type T with elements taken from product p.

Attributes

Inherited from:
Singleton
Source
Mirror.scala

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product