2 Modules
Ralph Schaer edited this page 2026-10-30 16:08:52 +01:00

Modules

The project is organized as a small family of modules so you can choose the transport stack and integrations you actually need.

Runtime modules

wamp2spring-core

Shared core functionality:

  • WAMP message model
  • broker and dealer infrastructure
  • @WampProcedure and @WampListener
  • WampPublisher
  • feature toggles
  • authorization SPI through WampAuthorizer
  • authentication provider SPI and built-in implementations

wamp2spring-servlet

Servlet stack integration built on Spring MVC and Spring WebSocket.

Use this when your application runs on the servlet stack and you want a /wamp WebSocket endpoint.

wamp2spring-reactive

Reactive stack integration built on Spring WebFlux.

Use this when your application is based on reactive web infrastructure.

Security modules

wamp2spring-security-core

Shared Spring Security support used by the servlet and reactive security modules.

wamp2spring-security-servlet

Servlet-side integration for applying Spring Security authorization rules to inbound WAMP message flows.

wamp2spring-security-reactive

Reactive-side integration for applying the same style of message authorization rules on WebFlux deployments.

Session module

wamp2spring-session-servlet

Servlet-only integration with Spring Session.

Enable this module with @EnableWampServletSession alongside @EnableServletWamp and a configured Spring Session SessionRepository. It installs WebSocket lifecycle and session-activity hooks. See Sessions for the current header-propagation limitation affecting activity refresh.

Typical combinations

  • MVC app with plain WAMP support: wamp2spring-servlet
  • MVC app with Spring Security: wamp2spring-servlet + wamp2spring-security-servlet
  • MVC app using Spring Session: add wamp2spring-session-servlet; WAMP routing state remains local to the process
  • WebFlux app with plain WAMP support: wamp2spring-reactive
  • WebFlux app with Spring Security: wamp2spring-reactive + wamp2spring-security-reactive

The security transport modules depend transitively on their matching WAMP transport module and wamp2spring-security-core. The session module depends on wamp2spring-servlet. Authentication providers and WampAuthorizer are in core and do not require Spring Security.

HTTP long polling is included in wamp2spring-servlet and has its own @EnableServletWampLongpoll configuration. There is no reactive long-poll or reactive Spring Session integration module here. See Transports.