Skip to content

Commit

Permalink
Fix migration notes for SubstreamCancelStrategy deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed Jul 11, 2024
1 parent 684fec9 commit 07013eb
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ to
```java
source
.splitAfter(somePredicate)
.concatSubstreams()
.withAttributes(ActorAttributes.supervisionStrategy(Supervision.resumingDecider));
```
@@@
Expand All @@ -62,11 +63,16 @@ source
```scala
source
.splitAfter(_ == somePredicate)
.concatSubstreams
.withAttributes(ActorAttributes.supervisionStrategy(Supervision.resumingDecider))
```
@@@

Note that the `.withAttributes` needs to be placed after the substreams are combined with
`.concatSubstreams` method, this is due to how attribute propagation currently behaves
when dealing with `SubFlow`'s.

If you already happen to have already explicitly defined a `SubstreamCancelStrategy` in the
`splitWhen`/`splitAfter` operators then there won't be any behavior change albeit you
will get deprecation warnings on compilation so its recommended to migrate your code to use
will get deprecation warnings on compilation so it's recommended to migrate your code to use
the equivalent `SupervisionStrategy` as described earlier.

0 comments on commit 07013eb

Please sign in to comment.