How to save a websocket client's connection and send it later with akka-streams and akka-http
How to save a websocket client's connection and send it later with akka-streams and akka-http I'm trying to follow this part of the akka-http documentation where it talks about handling web socket messages asynchronously akka-http What I am trying to do is this: Here is the code I have so far def hello: Route = { val amt = 1000 val helloRoute: Route = pathPrefix(Constants.apiVersion) { path("hello") { val source: Source[Message, SourceQueueWithComplete[Message]] = { Source.queue(1, OverflowStrategy.backpressure) } val paymentRequest = createPaymentRequest(1000, extractUpgradeToWebSocket) Directives.handleWebSocketMessages( paymentFlow(paymentRequest) ) } } helloRoute } private def createPaymentRequest(amt: Long, wsUpgrade: Directive1[UpgradeToWebSocket]) = { val httpResponse: Directive1[HttpResponse] = wsUpgrade.map { ws => val sink: Sink[Message, NotUsed] = Sink.cancelled() val source: Source[Message, ...
