This list Spring Boot application implements a STOMP relay that delegates to Redis pub/sub.
NOTE: this project is a work in progress and some aspects of the STOMP protocol are not yet implemented -- contributions are very welcome
mvn \
-Dspring.redis.host=172.17.0.1 \
-Dspring.redis.password=my#super#strong#pass \
-Dspring.redis.port=6379 \
-Dstomp-redis-relay.channel-prefix=/stomp/ \
spring-boot:run
docker run \
-p=61613:61613 \
-e SPRING_REDIS_HOST="172.17.0.1" \
-e SPRING_REDIS_PASSWORD="my#super#strong#pass" \
-e SPRING_REDIS_PORT=6379 \
-e STOMP-REDIS-RELAY_CHANNEL-PREFIX='/stomp/' \
--name=redis-stomp-relay \
-d redis-stomp-relay
The image exposes the standard STOMP port of 61613 and connects to a Redis instance.
-
All the variables are self explanatory except maybe
stomp-redis-relay.channel-prefix
. This must be conherent with the value you configure in your client'sStompBrokerRelay
(1). -
Instead of
spring.redis.host
,spring.redis.port
andspring.redis.password
, you can instead use the short hand config namesredis.host
,redis.port
andredis.password
. -
If no values are configured at all, the the following defaults will be used:
spring.redis.host: localhost
spring.redis.port: 6379
stomp-redis-relay.channel-prefix: /channel/
-
Additional Redis connection properties can be set by passing
--spring.redis.
prefixed properties (2)