Currently, we are using this to send the message to Client
Flow[Message]
.mapConcat(_ ⇒ Seq.empty[String].toList)
.merge(source) // Stream the data we want to the client
.map(data => TextMessage(data))
val source = Source.fromFuture(data).throttle(1, 1.second, 1, ThrottleMode.Shaping).runWith(Sink.ignore)
Now, I want to receive the response from Client and reply back accordingly. How should I do that?