These are chat archives for akkadotnet/AkkaStreams

30th
Sep 2018
AndreSteenbergen
@AndreSteenbergen
Sep 30 2018 12:40
What could be the reason for a stage to call CompleteStage in the logic, but not reach PostStop?
How could I debug that?
Marc Piechura
@marcpiechura
Sep 30 2018 13:08
Customstage or buildin?
AndreSteenbergen
@AndreSteenbergen
Sep 30 2018 13:08
Custom, I am having some issues with Kafka Producer Logic
I am Calling CompleteStage(), but I never see the PostStop being called
I do have a sink attached for the DeliveryReports, but that sink got all reports as well
AndreSteenbergen
@AndreSteenbergen
Sep 30 2018 15:25
I'll mock it and see what happens, maybe it is outside of the stage
AndreSteenbergen
@AndreSteenbergen
Sep 30 2018 15:47
I am receiving strange Messages with a mock producer:
[INFO][30-9-2018 15:39:49][Thread 0006][akka://migrator/user/StreamSupervisor-0/Flow-9-0-unknown-operation] Message ShellRegistered from akka://migrator/user/StreamSupervisor-0/Flow-9-0-unknown-operation to akka://migrator/user/StreamSupervisor-0/Flow-9-0-unknown-operation was not delivered. 2 dead letters encountered.
AndreSteenbergen
@AndreSteenbergen
Sep 30 2018 16:21

@marcpiechura This simple stage also produces the issue of not reaching PostStop. Am I missing something here? I have an async job doing just a simple wait. I think this stage is simple enough it should reach PostStop. Can you see what's going on? Is it me or a bug in Akka?

https://gist.github.com/AndreSteenbergen/55a325ab5417df06b3ac451c05058721

AndreSteenbergen
@AndreSteenbergen
Sep 30 2018 16:59
Found it. The callback is async. So I need an AsyncCallback
I'll add an asyncCallback to the ProducerLogic, need to do some cleaning first ....
Marc Piechura
@marcpiechura
Sep 30 2018 17:02
Yep you need to use asynccallbacks for continue with
Same concept as pipeto with normal actors
But I’ve overseen it too ;-)
AndreSteenbergen
@AndreSteenbergen
Sep 30 2018 17:04
np, that's always the issue working with code from others. I will try and finish the ProducerLogic tonight and add it to the already existing PR
I think I'll undo all changes to the code, made a lot of stuff specially for debugging purposes.
AndreSteenbergen
@AndreSteenbergen
Sep 30 2018 18:13
@marcpiechura @Horusiath I made some bugfixes to the kafka Producer. I must admit I made a change to all three logics to only log the error, but never fail the stage on them. I think the if check fails too often, e.g. the timeout exception on a producer is not a reason to fail the stage. The error is raised after 10 minutes of idle time, but that doesn't harm functionality.