This repository contains event driven redis app uses redis streams
docker run --rm --name redis -itp6379:6379 redis:6.2.6-alpine
mvn spring-boot:start
http --stream :8080 &
http :8080 body=Hello
http :8080 body=World
mvn spring-boot:stop
docker exec -it redis redis-cli
127.0.0.1:6379> XADD my_stream * value "Hello, World!"
# output: identity, which is message id:
"1637443677304-0"
127.0.0.1:6379> KEYS *
# output:
"my_stream"
127.0.0.1:6379> TYPE my_stream
# output:
stream
127.0.0.1:6379> XREAD STREAMS my_stream 0
# output:
1) 1) "my_stream"
2) 1) 1) "1637443677304-0"
2) 1) "value"
2) "Hello, World!"
127.0.0.1:6379> XREAD STREAMS my_stream 1637443677304-0
# output:
(nil)
127.0.0.1:6379> XREAD BLOCK 5000 STREAMS my_stream 1637443677304-0
# output:
(nil)
(5.09s)
docker stop redis
- YouTube: Event-Driven Java Applications with Redis 5.0 Streams
- https://dev.to/azure/redis-streams-in-action-part-3-java-app-to-process-tweets-with-redis-streams-3n7n
- https://github.com/mp911de/redis-stream-demo/
- https://www.youtube.com/watch?v=Y4T55XMpP_Y
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Coroutines section of the Spring Framework Documentation
- Spring Data Reactive Redis
- Messaging with Redis