These are chat archives for akkadotnet/AkkaStreams

1st
Dec 2016
Sean Farrow
@SeanFarrow
Dec 01 2016 16:13
Hi, I'm currently confused as to what the purpose of a stage with a materialized value is. Let's say I'm wrapping an api that returnes a Task<T> then I can return T to the stage, or fail the stage if an exception is thrown. Any explanations/pointers apreciated as I've read the docs and still can't make sense of why this would be needed.
Marc Piechura
@marcpiechura
Dec 01 2016 17:56
@SeanFarrow you don't need to expose the materialized value, by default "NotUsed" is used as materialized value and normally you don't use it in a Flow stage but rather in Source or Sink stages. Keep in mind that a Source/Flow/Sink stage is only a blueprint which you can reuse in multiple streams, so you need to a way to expose some values when you actually run the stream, therefore some stages are returning a materialized value when you run them, for example an IActorRef from Source.ActorRef. This materialized value is created every time you call Run on a stream that contains this blueprint. Does that make sense ?
Sean Farrow
@SeanFarrow
Dec 01 2016 21:22
@silv3rcircl3 Kind of, In a sink why would I want a matterialized value? I thought that was the end of the graph/flow/stream? I've got an api I'm wrapping in to a sink that returns a Task<WriteResult>. So, would you have the WriteResult as the matterialized value, or the Task<WriteResult>?