wamp2spring
wamp2spring is a Java implementation of the WAMP v2 specification built on top of Spring Framework 7 and Spring Boot 4.
WAMP is a WebSocket subprotocol that combines two messaging styles in one protocol:
- Remote Procedure Calls through the dealer role
- Publish/Subscribe messaging through the broker role
The current codebase is substantially more capable than the original wiki. In addition to the basic RPC and Pub/Sub workflow, it now includes separate servlet and reactive integrations, Spring Security integration, Spring Session integration for the servlet stack, a single shared routing scope instead of realm-based partitioning, multiple serializers, servlet long-poll transport, and a broader set of advanced WAMP profile features.
What the current project contains
The repository is split into focused modules:
wamp2spring-core: core message model, routing, annotations, publisher API, authorization SPIwamp2spring-servlet: servlet/WebSocket integration for Spring MVCwamp2spring-reactive: reactive/WebSocket integration for Spring WebFluxwamp2spring-security-core: shared Spring Security integration pieceswamp2spring-security-servlet: servlet-specific security supportwamp2spring-security-reactive: reactive-specific security supportwamp2spring-session-servlet: Spring Session integration for servlet deployments
Highlights in the current line
- Spring Framework 7 and Spring Boot 4 support
- Java 17 baseline
- A single shared routing scope for connections, subscriptions, registrations, and meta APIs
- WAMP authentication hooks with built-in providers for Ticket, WAMP-CRA, SCRAM, and dynamic authentication
- Spring Security authorization support for WAMP message flows
- Spring bean annotations for procedures and listeners:
@WampProcedureand@WampListener WampPublisherbean for server-side event publication- WebSocket serializers for JSON, MessagePack, CBOR, and Smile
- Servlet long-poll transport in addition to WebSocket
- Advanced profile support including timeout handling, cancellation, progressive results, publisher/subscriber filtering, and pattern matching
Start here
- Quickstart for the smallest working application
- Maven for dependency coordinates and module selection
- Modules for a module-by-module overview
- Features for protocol capabilities and toggles
- Security for Spring Security integration
- Authentication for WAMP authentication and transport principals
- Transports for WebSocket, long-poll, and serializer support
Example applications
Example applications live in the separate wamp2spring-demo repository.
Version note
The latest release is 4.0.0. The dependency examples in this wiki use the released artifacts published to Maven Central.