[Feature] Redis 중복 발송 방지 구현 #108

Closed
opened 2026-02-10 07:02:08 +00:00 by seonkyu.kim · 0 comments
Owner

설명

Redis를 사용하여 푸시 메시지 중복 발송을 방지하는 로직을 구현한다.

PushWorker가 메시지를 처리할 때, Redis의 SetNX를 사용하여 duplicate:{request_id} 키가 이미 존재하면 중복으로 판단하고 스킵한다.

📌 참조: Documents/BatchScheduler_Design.md §2 처리 흐름 [1] Redis 중복 체크

체크리스트

Application Layer

  • SPMS.Application/Settings/RedisSettings.cs — Redis 설정 POCO
  • SPMS.Application/Interfaces/IDuplicateChecker.cs — 중복 체크 인터페이스

Infrastructure Layer

  • SPMS.Infrastructure/Caching/RedisConnection.cs — Redis 연결 관리 (ConnectionMultiplexer 싱글톤)
  • SPMS.Infrastructure/Caching/DuplicateChecker.cs — 중복 체크 구현체
    • Key 형식: duplicate:{request_id}
    • TTL: 24시간
    • SetNX (SET if Not eXists) 사용

설정

  • appsettings.json Redis 섹션 추가
  • SPMS.Infrastructure/DependencyInjection.cs — DI 등록
  • SPMS.Infrastructure/SPMS.Infrastructure.csproj — StackExchange.Redis 패키지 추가
## 설명 Redis를 사용하여 푸시 메시지 중복 발송을 방지하는 로직을 구현한다. PushWorker가 메시지를 처리할 때, Redis의 SetNX를 사용하여 `duplicate:{request_id}` 키가 이미 존재하면 중복으로 판단하고 스킵한다. > **📌 참조**: `Documents/BatchScheduler_Design.md` §2 처리 흐름 [1] Redis 중복 체크 ## 체크리스트 ### Application Layer - [x] `SPMS.Application/Settings/RedisSettings.cs` — Redis 설정 POCO - [x] `SPMS.Application/Interfaces/IDuplicateChecker.cs` — 중복 체크 인터페이스 ### Infrastructure Layer - [x] `SPMS.Infrastructure/Caching/RedisConnection.cs` — Redis 연결 관리 (ConnectionMultiplexer 싱글톤) - [x] `SPMS.Infrastructure/Caching/DuplicateChecker.cs` — 중복 체크 구현체 - Key 형식: `duplicate:{request_id}` - TTL: 24시간 - SetNX (SET if Not eXists) 사용 ### 설정 - [x] `appsettings.json` Redis 섹션 추가 - [x] `SPMS.Infrastructure/DependencyInjection.cs` — DI 등록 - [x] `SPMS.Infrastructure/SPMS.Infrastructure.csproj` — StackExchange.Redis 패키지 추가
seonkyu.kim added the
Priority
High
Status
In Progress
Type
Feature
labels 2026-02-10 07:02:19 +00:00
seonkyu.kim added this to the Phase 3: 메시지 & Push Core milestone 2026-02-10 07:02:22 +00:00
seonkyu.kim self-assigned this 2026-02-10 07:03:05 +00:00
seonkyu.kim added
Status
Done
and removed
Status
In Progress
labels 2026-02-10 07:10:16 +00:00
Sign in to join this conversation.
No description provided.