apache / pekko

Build highly concurrent, distributed, and resilient message-driven applications using Java/Scala
https://pekko.apache.org/
Apache License 2.0
1.2k stars 148 forks source link

Add wiretap/wiretapContext to FlowWithContext/SourceWithContext #1446

Closed mdedetrich closed 2 months ago

mdedetrich commented 2 months ago

Analogous to https://github.com/apache/pekko/pull/1443 but with wireTap/wireTapContext

mdedetrich commented 2 months ago

So the tests in the PR are now working, I ended up having to use atLeastOneElementOf since the feature of wireTap is that it will drop elements if the downstream consumer is not ready (rather than back pressuring which is what alsoTo does).

In other words its possible that in certain test runs one of the elements may be missing, which is intentional behaviour of wireTap.

mdedetrich commented 2 months ago

@pjfanning Do you mind reviewing this PR? You have reviewed the previous version and its the last thing from my side for the next RC which you wanted to plan for Thursday.