샘플 데이터 발행량 축소 (타임아웃 방지)

- ParticipantRegistered 이벤트: 27,610건 → 180건
- 이벤트별 참여자 수:
  - 이벤트1: 15,420명 → 100명
  - 이벤트2: 8,950명 → 50명
  - 이벤트3: 3,240명 → 30명
- Kafka 발행 지연 로직 제거 (불필요)
- MVP 테스트에 충분한 데이터 유지

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Hyowon Yang 2025-10-24 15:27:30 +09:00
parent 4c8165bd20
commit 7b3ca40e22
8 changed files with 4 additions and 10 deletions

View File

@ -19,7 +19,8 @@
"Bash(netstat:*)", "Bash(netstat:*)",
"Bash(findstr:*)", "Bash(findstr:*)",
"Bash(./gradlew analytics-service:compileJava:*)", "Bash(./gradlew analytics-service:compileJava:*)",
"Bash(python -m json.tool:*)" "Bash(python -m json.tool:*)",
"Bash(powershell:*)"
], ],
"deny": [], "deny": [],
"ask": [] "ask": []

View File

@ -95,7 +95,7 @@ public class SampleDataLoader implements ApplicationRunner {
log.info("발행된 이벤트:"); log.info("발행된 이벤트:");
log.info(" - EventCreated: 3건"); log.info(" - EventCreated: 3건");
log.info(" - DistributionCompleted: 12건 (3 이벤트 × 4 채널)"); log.info(" - DistributionCompleted: 12건 (3 이벤트 × 4 채널)");
log.info(" - ParticipantRegistered: 약 27,610건"); log.info(" - ParticipantRegistered: 180건 (MVP 테스트용)");
log.info("========================================"); log.info("========================================");
// Consumer 처리 대기 (3초) // Consumer 처리 대기 (3초)
@ -232,7 +232,7 @@ public class SampleDataLoader implements ApplicationRunner {
*/ */
private void publishParticipantRegisteredEvents() throws Exception { private void publishParticipantRegisteredEvents() throws Exception {
String[] eventIds = {"evt_2025012301", "evt_2025020101", "evt_2025011501"}; String[] eventIds = {"evt_2025012301", "evt_2025020101", "evt_2025011501"};
int[] totalParticipants = {15420, 8950, 3240}; int[] totalParticipants = {100, 50, 30}; // MVP 테스트용 샘플 데이터 ( 180명)
String[] channels = {"우리동네TV", "지니TV", "링고비즈", "SNS"}; String[] channels = {"우리동네TV", "지니TV", "링고비즈", "SNS"};
int totalPublished = 0; int totalPublished = 0;
@ -254,13 +254,6 @@ public class SampleDataLoader implements ApplicationRunner {
publishEvent(PARTICIPANT_REGISTERED_TOPIC, event); publishEvent(PARTICIPANT_REGISTERED_TOPIC, event);
totalPublished++; totalPublished++;
// 1000명마다 로그 출력 짧은 대기 (Kafka 부하 방지)
if (totalPublished % 1000 == 0) {
log.info(" ⏳ ParticipantRegistered 발행 진행 중... ({}/{})", totalPublished,
totalParticipants[0] + totalParticipants[1] + totalParticipants[2]);
Thread.sleep(100); // 0.1초 대기
}
} }
} }