I have configured a Akka stream workflow using some custom graph stages. The layout of my workflow is fixed during the runtime of the application. But I have to pass different user data to the GraphStageLogic instances on every stream materialization. How can that be achieved?
Today I am creating the entire workflow again and again using the GraphDSL. During that process I am passing that user data to the GraphStage which then during materialization passes it to the GraphStageLogic. Is that the indended behaviour to do this? Since in fact connecting all the graph stages in theory should be only necessary once for a fixed layout. Only the materialization should happen multiple times.
The same thing in my opinion also appliest to the standard FileSource. If I have a fixed layout, the source should get the file to process on every stream materialization, not when setting up the Source initially.
Any thoughts or comments on this?