Transports
wamp2spring currently supports multiple wire formats and more than one transport style.
WebSocket transport
Both the servlet and reactive modules expose a WAMP endpoint at /wamp by default.
Supported subprotocols:
wamp.2.json
wamp.2.msgpack
wamp.2.cbor
wamp.2.smile
Frame handling follows the negotiated serializer:
wamp.2.json uses text frames
- the binary serializers use binary frames
Servlet long-poll transport
The servlet stack also provides HTTP long-poll transport through @EnableServletWampLongpoll.
This transport is exposed below /wamp and uses endpoints for:
- opening a transport session
- sending WAMP frames
- receiving queued outbound frames
- closing the transport
Long-poll uses the same core session support, authentication flow, and routing model as WebSocket.
Long-poll tuning
Servlet long-poll behavior can be tuned through WampServletLongpollConfigurer:
- receive timeout
- maximum queue size
- idle timeout for transports
Serializer notes
The current codebase supports:
- JSON for standard text-frame interoperability
- MessagePack for compact binary transport
- CBOR for compact binary transport
- Smile for an additional Jackson-backed binary format
Choosing a transport
- Use WebSocket when possible. It is the native WAMP transport and has the best interoperability story.
- Use servlet long-poll only when your deployment environment requires HTTP-based fallback semantics.
- There is no separate reactive long-poll module in the current repository.