레디스 pub/sub 메시징시스템
This guide walks you through the process of using Spring Data Redis to publish and subscribe to messages sent with Redis.
uses ' StringRedisTemplate ' to publish a string message
and has a POJO subscribe for the message by using ' MessageListenerAdapter '
( Plain Old Java Object )
Redis provides not only a NoSQL data store
but a messaging system as well.
spring-boot-docker-compose의존성이 있으면 스프링에서 실행되는거
Search for a compose.yml and other common compose filenames in your working directory
Call docker compose up with the discovered compose.yml
Create service connection beans for each supported container
Call docker compose stop when the application is shutdown
Create a Redis Message Receiver
In any messaging-based application
, there are message publishers and messaging receivers
Register the Listener and Send a Message
Spring Data Redis provides all the components you need to send and receive messages with Redis.
Specifically, you need to configure:
A connection factory
A message listener container
A Redis template
https://spring.io/guides/gs/messaging-redis
Getting Started | Messaging with Redis
To run the code without Spring Boot Docker Compose support, you need a version of Redis running locally. To do this, you can use Docker Compose, but you must first make two changes to the compose.yaml file. First, modify the ports entry in compose.yaml to
spring.io
'DB > Redis' 카테고리의 다른 글
| Redis 캐시 데이터 영구 저장하는 방법 (RDB / AOF) (0) | 2025.03.11 |
|---|---|
| Redis 명령어 02 (0) | 2024.06.26 |
| Redis 01 (0) | 2024.06.26 |
| Redis 명령어 01 (0) | 2024.06.25 |
| Redis 시작 ( 윈도우 ) (0) | 2024.06.24 |