These are chat archives for akkadotnet/AkkaStreams

5th
Dec 2018
Arjen Smits
@Danthar
Dec 05 2018 09:59
Ok im running into an issue i dont expect. Im constructing a flow with a Broadcast stage. With 2 outputs. in one for the outputs i throw an exception. I configured the flow in that output to restart upon failure
But instead the entire app (console app) crashes
Am i forgetting something here? Or am i making the wrong assumptions ?
image.png
AndreSteenbergen
@AndreSteenbergen
Dec 05 2018 10:10
I am waiting on the new 1.0 for kafka. After that I will create a new PR for kafka streams as well. I guess Akka 1.3.11 will be sooner then Kafka, so I will base it on Akka 1.3.11 when the time comes. There is quite some discussion going on about the .net api. I have it working on beta2, but a beta3 is imminent, with breaking changes.
Marc Piechura
@marcpiechura
Dec 05 2018 10:23
@Danthar has foreach a overload which supports Func<Task> ?
Arjen Smits
@Danthar
Dec 05 2018 10:24
i think it does?
Marc Piechura
@marcpiechura
Dec 05 2018 10:24
Could be Action
Then your task would handle the exception
Arjen Smits
@Danthar
Dec 05 2018 10:24
ill have to check.
Marc Piechura
@marcpiechura
Dec 05 2018 10:24
But don’t know why your app would crash ^^
Arjen Smits
@Danthar
Dec 05 2018 10:24
in meeting atm ill get back this aspa
asap
myeah app crashes cause stream propagates exception up
Marc Piechura
@marcpiechura
Dec 05 2018 10:30
mh, strange, Sink.Foreach takes a Action<TIn>
Sink<TIn, Task> ForEach<TIn>(Action<TIn> action)
so I would expect that the async creates a task where your exception is thrown and simply "returns" a failed tasked, but maybe the compiler is smart enough to reduce it to a simple action since you don't await anything
Arjen Smits
@Danthar
Dec 05 2018 10:31
yeah the throw exception is a placeholder. you can see the await indexer.blah
commented out
i can try to remove the async and see if that changes anything
or use a stub indexer that throws an exception
Marc Piechura
@marcpiechura
Dec 05 2018 10:32
or use .Via(Flow.SelectAsync(throw)).To(Sink.Ignore)
Arjen Smits
@Danthar
Dec 05 2018 10:32
yeah that crossed my mind as well.
Marc Piechura
@marcpiechura
Dec 05 2018 10:32
just to make sure no strange things are happening with async await
Arjen Smits
@Danthar
Dec 05 2018 11:38
Ok yeah its an async thing
if i remove the async keyword, it restarts as expected
Marc Piechura
@marcpiechura
Dec 05 2018 12:16
👍