데이팅 도메인의 쿼리 서비스 (데이팅 이벤트 조회 전담)
- 포트: 8086
- 데이터베이스: MongoDB (localhost:27017)
- Kafka: localhost:9092 (이벤트 구독)
- Framework: Spring Boot 3.5.4, Java 21
CQRS Query Side로서 Command Service의 모든 이벤트를 구독하여 Read Model 업데이트:
| 이벤트 타입 | Kafka Topic | 처리 상태 | Read Model 업데이트 |
|---|---|---|---|
DatingMeetingCreated |
grewmeet.dating.meeting.created |
✅ 완료 | DatingEvent 생성 |
DatingMeetingUpdated |
grewmeet.dating.meeting.updated |
✅ 완료 | DatingEvent 업데이트 |
DatingMeetingDeleted |
grewmeet.dating.meeting.deleted |
✅ 완료 | 상태 → CANCELLED |
ParticipantJoined |
grewmeet.dating.participant.joined |
✅ 완료 | EventParticipant 생성 |
ParticipantLeft |
grewmeet.dating.participant.left |
✅ 완료 | EventParticipant 탈퇴 |
./gradlew bootRun-
GET
/events- 이벤트 목록 조회 (페이징)- Query:
page,size
- Query:
-
GET
/events/{meetingUuid}- 이벤트 상세 조회- Path:
meetingUuid(UUID)
- Path:
-
GET
/events/{meetingUuid}/participants- 참여자 목록- Path:
meetingUuid(UUID)
- Path:
-
GET
/events/search- 이벤트 검색- Query:
keyword,location,page,size
- Query:
- GET
/users/me/events- 내 참여 이벤트- Header:
X-User-Id(UUID)
- Header:
{
"_id": "ObjectId(...)",
"meetingUuid": "550e8400-e29b-41d4-a716-446655440000",
"title": "인코딩 테스트 미팅",
"description": "한글 확인",
"hostAuthUserId": "550e8400-e29b-41d4-a716-446655440000",
"hostNickname": "테스트호스트",
"meetingDateTime": "2025-12-01T19:00:00",
"location": "서울시 강남구",
"maxMaleParticipants": 5,
"maxFemaleParticipants": 5,
"currentMaleParticipants": 0,
"currentFemaleParticipants": 0,
"status": "ACTIVE",
"createdAt": "2025-11-04T18:14:48",
"updatedAt": "2025-11-04T18:14:48"
}{
"_id": "ObjectId(...)",
"meetingUuid": "550e8400-e29b-41d4-a716-446655440000",
"authUserId": "550e8400-e29b-41d4-a716-446655440001",
"gender": "MALE",
"status": "ACTIVE",
"joinedAt": "2025-11-04T18:30:00"
}- CQRS Query Side (읽기 전용)
- Event-Driven (Kafka Consumer)
- Eventually Consistent (최종 일관성)
- MongoDB (조회 최적화)
- UUID 기반 식별 (
meetingUuid) - 성별별 참여 인원 추적
- 한글 UTF-8 완벽 지원
- Soft Delete (CANCELLED 상태)
- 중복 이벤트 처리 방지
- Kafka에서 이벤트 수신
- 중복 확인 (meetingUuid 기반)
- MongoDB Read Model 업데이트
- 참여 인원수 자동 계산
- 상태 자동 관리 (ACTIVE → FULL)