I am trying my hands on the Akka Stream DSL.
The thing that I can not get to compile is strong typed Flow
s.
For Zip
I do the following and it compiles fine:
val fanIn = builder.add(Zip[LoginResponse, LoginCommand.UserData])
For Flow
however I cannot seem to get it working as desired since the following does not compile:
val encryptLoginData = builder.add(Flow[(LoginResponse, LoginCommand.UserData), LoginCommand.UserData])
From the error message I cannot really tell, what I am doing wrong.
I noticed that apply
is only taking a single type, but how is this supposed to show mapping between in <-> out?
Any hints on what I am doing wrong, or how this is supposed to be declared?