Stateful subscription using streams

Note: this might be similar to this topic Question about stateful multiplexed protocols on top of akka-streams, but something seems off there — the author talks about GraphStage[FlowShape] and MergeHub, which don’t look like what I need to do.