* Optimize flatMapConcat for single element source, #25241
* Grab the SourceSingle via TraversalBuilder
* Also handle the case when there is no demand
* don't match when mapMaterializedValue and async
When a Success is received, call onCompleteThenStop instead of just
context.stop; that takes care of the completion logic instead of just
stopping the actor and leaving the stream going.
Add test to ensure the stream materializes on Source.actorRef receiving
Status.Success
Remove tests around stream completion behaviour in response to
PoisonPill - as well as these tests not correctly demonstrating that the
completion was passed on downstream, they describe behaviour which was
previously incidental and is no longer accurate.
Update the docs to reflect that PoisonPill should not be used on the
actor ref as this scenario will necessarily result in bad behaviour as
it will be unable to signal the completion downstream.
Make a few grammar fixes and remove some trailing space while updating the
docs.
This fixes (or decreases the chances significately for) a
situation where a stream of incoming connections is closed
and the incoming connection does not have a chance to startup
properly.
* Add more convenient version of recover, recoverWith and recoverWithRetries for javadsl.Flow.
* The new method take a Class parameter to decide which failure to recover from.
* Also add corresponding unit tests for them.
* use case expression to express partial function
* make time out larger in unit test
* checkstyle
* fix parameter type
* Don't write to actual disk in test
* Silence expected log errors
* Bugfix #24924 UnfoldResource closed resource twice on failure
* One more case where close would be called twice
* Toggle closed flag after operation in restartState
* open false _before_ closing in restartState
* +str,typ introduce akka typed ask for akka stream
address feedback and add actor interop stages incl ask to docs
more compile tests and adjusted things
last docs
* document adding stages to docs in CONTRIBUTING
* address review comments
* rebase conflicts
`groupBy`'s default behavior is to filter elements, that would go to a substream
that is already closed. This allows `groupBy` to recreate those already closed streams,
if wanted, and run them as if they would've never run before in the first place.
Overload instead of default parameter
Make set of closed keys unmodifiable if not needed
Adjust documentation, adding a warning on memory consumption.
Add MiMa exclude.
* RestartWithBackOff delay cancel to wait for failure
For wrapping a user flow with FlowRestart.onFlowWithFailures when the user
flow it fails signals a cancel upstream and a failure downstream.
These are intercepted by a SubSource/SubSink. In the case
the SubSource receives the cancel before the SubSink receives
the real upstream is wrongly canceled leading to an error
when the SubSink restarts the flow.
This commit introduces a delay for the cancel so that the failure
is more likely to win.
Would be far better to propagate a reason for cancel so this could
be deterministic. See https://github.com/akka/akka/pull/23909
Refs #24528#24726
Each build is now over 40mb logs.
A lot of DEBUG logging was left on for test failures that have been
fixed. Added an issue # for ones that are still valid or if if it on
as the test verifies debug
* automatic throttle burst size, #24699
* throttleEven used maxBurst=Int.MaxValue, which in practise resulted
in no throttling at all at high rates
* The original problem that throttleEven tried to solve was that when
the throttle rate (cost / per) was high the cost of scheduling
dominated and became much lower than the given rate, if 0 or low
maxBurst was given. Difficult for user to know what maxBurst to use.
* In fact, that was already the case for rates > 30/s.
* This is fixed by automatically adjusting the maxBurst for higher
throttle rates in a new throttle overload that doesn't include
maxBurst parameter
* Also skipped the mode parameter for that variant since Shaping is
what almost always is what you want, and otherwise you can use
the full signature with a good maxBurst
* Deprecated throttleEven, since it is the same. Also fixed the
implementation of throttleEven to use the automatic burst size,
since Int.MaxValue is not useful at all.