Consuming both Strict and Streamed WebSocket Messages in Akka
问题 I am experimenting with building a web socket service using Akka HTTP. I need to handle Strict messages that arrive in totality, as well as handle Streamed messages that arrive in m multiple frames. I am using a route with handleWebSocketMessages() to pass the handling of web sockets off to a flow. The code I have looks something like this: val route: Route = get { handleWebSocketMessages(createFlow()) } def createFlow(): Flow[Message, Message, Any] = Flow[Message] .collect { case TextMessage