https://github.com/itzg/redis-stomp-relay
This Spring Boot application implements a STOMP relay that delegates to Redis pub/sub.
https://github.com/itzg/redis-stomp-relay
Last synced: 8 months ago
JSON representation
This Spring Boot application implements a STOMP relay that delegates to Redis pub/sub.
- Host: GitHub
- URL: https://github.com/itzg/redis-stomp-relay
- Owner: itzg
- License: apache-2.0
- Created: 2016-11-20T19:44:18.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-01-19T17:15:03.000Z (over 5 years ago)
- Last Synced: 2025-02-01T15:40:53.387Z (over 1 year ago)
- Language: Java
- Size: 36.1 KB
- Stars: 16
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://circleci.com/gh/itzg/redis-stomp-relay)
[  ](https://bintray.com/itzgeoff/artifacts/redis-stomp-relay)
This list Spring Boot application implements a STOMP relay that delegates to
[Redis pub/sub](http://redis.io/topics/pubsub).
**NOTE: this project is a work in progress and some aspects of the STOMP protocol are not yet implemented -- contributions are very welcome**
## Run in the CLI:
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
## Run with docker:
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.
## Some considerations
* 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's `StompBrokerRelay` (1).
* Instead of `spring.redis.host`, `spring.redis.port` and `spring.redis.password`, you can instead use the short hand
config names `redis.host`, `redis.port` and `redis.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)
## External references
(1) [Spring Boot STOMP docs](https://docs.spring.io/spring/docs/current/spring-framework-reference/html/websocket.html#websocket-stomp-handle-broker-relay)
(2) [Spring Boot Redis properties](http://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/autoconfigure/data/redis/RedisProperties.html)