Skip to content

[MESP-274] [Story] 배지 달성 시 알림 이벤트 발행 #502

Description

@DDINGJOO

📌 상위 Epic

#499

설명

AS A 사용자
I WANT 배지를 획득하면 즉시 알림을 받을 수 있도록
SO THAT 성취감을 즉시 느낄 수 있다

인수 조건

  • 배지 달성 시 SNS 토픽에 이벤트 발행
  • 이벤트에 배지 정보 포함 (타입, 이름, 아이콘, 획득 시간)
  • 기존 배지 로직에 영향 없음 (non-blocking)
  • SNS 발행 실패 시 로깅만 (배지 수여는 정상 진행)

Tasks

  • BadgeService에 SNS 클라이언트 추가
  • 배지 수여 시 SNS publish 호출
  • 이벤트 페이로드 구성 (userId, badgeType, badgeName, iconUrl, earnedAt)
  • 에러 핸들링 (try-catch, 로깅)

알림 메시지 스키마

```json
{
"type": "BADGE_EARNED",
"userId": "xxx-xxx-xxx",
"payload": {
"badgeType": "NEWS_READER_10",
"badgeName": "뉴스 리더",
"description": "뉴스 10개 읽기 달성",
"iconUrl": "https://...",
"earnedAt": "2026-01-23T15:30:00Z"
}
}
```

예상 작업량

2 Story Points

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend code changesstoryUser story

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions