WAMP v2 Implementation for Spring 5

Implementation of WAMP v2 based on the Spring 5 websocket support

License

License

GroupId

GroupId

ch.rasc
ArtifactId

ArtifactId

wamp2spring
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

WAMP v2 Implementation for Spring 5
Implementation of WAMP v2 based on the Spring 5 websocket support
Project URL

Project URL

https://github.com/ralscha/wamp2spring/
Source Code Management

Source Code Management

https://github.com/ralscha/wamp2spring.git

Download wamp2spring

How to add to project

<!-- https://jarcasting.com/artifacts/ch.rasc/wamp2spring/ -->
<dependency>
    <groupId>ch.rasc</groupId>
    <artifactId>wamp2spring</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/ch.rasc/wamp2spring/
implementation 'ch.rasc:wamp2spring:1.0.0'
// https://jarcasting.com/artifacts/ch.rasc/wamp2spring/
implementation ("ch.rasc:wamp2spring:1.0.0")
'ch.rasc:wamp2spring:jar:1.0.0'
<dependency org="ch.rasc" name="wamp2spring" rev="1.0.0">
  <artifact name="wamp2spring" type="jar" />
</dependency>
@Grapes(
@Grab(group='ch.rasc', module='wamp2spring', version='1.0.0')
)
libraryDependencies += "ch.rasc" % "wamp2spring" % "1.0.0"
[ch.rasc/wamp2spring "1.0.0"]

Dependencies

compile (8)

Group / Artifact Type Version
org.springframework : spring-websocket jar 5.0.0.RELEASE
org.springframework : spring-messaging jar 5.0.0.RELEASE
org.springframework : spring-webmvc jar 5.0.0.RELEASE
com.fasterxml.jackson.core : jackson-databind jar 2.9.1
org.msgpack : jackson-dataformat-msgpack jar 0.8.13
com.fasterxml.jackson.dataformat : jackson-dataformat-cbor jar 2.9.1
com.fasterxml.jackson.dataformat : jackson-dataformat-smile jar 2.9.1
com.github.ben-manes.caffeine : caffeine jar 2.5.6

test (6)

Group / Artifact Type Version
org.assertj : assertj-core jar 3.8.0
junit : junit jar 4.12
org.springframework.boot : spring-boot-starter-websocket jar 1.5.7.RELEASE
org.springframework.boot : spring-boot-starter-test jar 1.5.7.RELEASE
org.mockito : mockito-core jar 2.10.0
nl.jqno.equalsverifier : equalsverifier jar 2.3.3

Project Modules

There are no modules declared in this project.

Build Status

wamp2spring is a Java implementation of the WAMP specification built on top of the WebSocket support of Spring 5.
WAMP is a WebSocket subprotocol that provides two application messaging patterns: Remote Procedure Calls and Publish / Subscribe.

Implementation

wamp2spring implements the Basic Profile, but it does not support multiple realms in one application. Every connection, registration and subscription exists in the same realm and wamp2spring ignores the realm parameter of the HELLO message.

Additionally wamp2spring implements a few features from the Advanced Profile:

Feature Remark
caller_identification disclose_me option in the CALL message. Specification
subscriber_blackwhite_listing Exclude and include receivers with their WAMP session id. Only eligible and exclude options are implemented. Specification.
publisher_exclusion exclude_me option in the PUBLISH message. By default the publisher is excluded from receiving the EVENT message. Specification
publisher_identification disclose_me option in the PUBLISH message. Specification
pattern_based_subscription Prefix- and wildcard matching policies for subscriptions. Specification
event_retention Specification

Dataformats
wamp2spring supports JSON (wamp.2.json) and MessagePack (wamp.2.msgpack) required by the Basic Profile. In addition it supports CBOR (wamp.2.cbor) and SMILE (wamp.2.smile).

Fallback
Currently wamp2spring does not support a fallback solution when peers cannot establish WebSocket connections. autobahn-js implements a fallback with long polling. You find the description about the protocol in the specification (Section 14.5.3.3). So far I don't have a need for a fallback solution because WebSocket works fine especially when it's sent over TLS connections. But when there is a need I will try to add this fallback solution. Pull requests are always welcome.

Quickstart

See Wiki

Maven

See Wiki

Example applications

You find a collection of example applications in the wamp2spring-demo GitHub repository.

Changelog

See Wiki

More information

See Wiki

License

Code released under the Apache license.

Versions

Version
1.0.0