Spring WebFlux · AsyncAPI Specification
Spring WebFlux WebSocket API
Version 6.2.0
AsyncAPI specification describing WebSocket communication patterns for Spring WebFlux applications. Spring WebFlux provides reactive WebSocket support via WebSocketHandler and WebSocketSession, enabling full-duplex, bidirectional messaging between clients and servers.
View Spec
View on GitHub
JavaMicroservicesNon-Blocking IOReactive ProgrammingREST APISpring BootSpring FrameworkWebFluxAsyncAPIWebhooksEvents
Channels
websocketSession
WebSocket channel mapped via Spring WebFlux WebSocketHandlerAdapter. A WebSocketSession is established on connection and provides reactive inbound() and outbound() message streams.
stompBroker
STOMP over WebSocket channel. Spring WebFlux integrates with STOMP messaging protocol for topic subscriptions, queued messages, and message broker relay.
Messages
TextMessage
WebSocket Text Message
A UTF-8 encoded text data frame (opcode 0x1)
BinaryMessage
WebSocket Binary Message
A binary data frame (opcode 0x2)
PingMessage
WebSocket Ping Frame
A control ping frame (opcode 0x9) for keep-alive
PongMessage
WebSocket Pong Frame
A control pong frame (opcode 0xA) in response to ping
CloseMessage
WebSocket Close Frame
A control close frame (opcode 0x8) to initiate connection closure
StompMessage
STOMP Frame
A STOMP protocol frame for topic messaging over WebSocket
Servers
ws
production
Spring WebFlux WebSocket endpoint
wss
secure
Secure Spring WebFlux WebSocket endpoint (TLS)