UnzipWith (both javadsl and scaladsl) states that it cancels when any downstream cancels. However, the actual implementation cancels only when the _last_ downstream cancels.
That's a valuable clarification! Would you be interested in proposing a PR to fix the docs?
It also affects Unzip. Is it really just a documentation issue? Or actually a bug, and implementation needs to be adjusted?
For sure it is currently inconsistent with other FanOutShape implementations (Broadcast, Balance, Partition), maybe it makes sense to align with them by adding an eagerCancel parameter?
We also fell into this trap, I wonder what the initial rationale was to not have Unzip cancel. There is a specific test case for this.
update
There was the idea to have a eagerCancel option but it was not implemented
https://github.com/akka/akka/issues/15396
Workaround is to use a Broadcast(2) and do a map on each of the outputs
Most helpful comment
It also affects
Unzip. Is it really just a documentation issue? Or actually a bug, and implementation needs to be adjusted?For sure it is currently inconsistent with other
FanOutShapeimplementations (Broadcast,Balance,Partition), maybe it makes sense to align with them by adding aneagerCancelparameter?