I have a graph that I create with the GraphDSL in java.
The structure of the graph is something like this:
(S1) (S2) ... (SN) (SourceQueue) V V V V (connect to merge). V (via) V StreamCompleter GraphStage V V (connect to merge preferred) (Merge Preferred) V ProcessorStage GraphStage V Producer.plainSink
RabbitMq sources, and the
ProcessorStage graph stage outputs
I create the
eagerComplete = true.
StreamCompleter is a graph stage, which is basically a
It receives a message via a
SourceQueue, and completes the stream, not before sending a piece of data to another place in the app.
What I want to be able to do, is to only send this data after the kafka
plainSink has completed.
I refactored my code a bit to send the data in
But I’m not sure this gives me the guarantee that the kafka sink has flushed all the records it had.
I’m not that good at
Akka, as this is a pretty complicated matter and we don’t do much of it in our company, not enough to know the specifics.
I would appreciate some help with understanding the lifecycle methods involved here,
f.e: when exactly is
postStop called compare to the kafka sink completing itself?
Thanks for helping, be safe and healthy!