Kafka 메시지 타입 불일치 수정 (Long → UUID)
변경 내역: - EventCreatedMessage: eventId, userId 타입을 Long에서 UUID로 변경 - EventKafkaProducer: publishEventCreated 메소드 파라미터 타입을 UUID로 변경 변경 이유: - Event Entity는 UUID 타입을 사용하지만 Kafka 메시지는 Long을 사용하여 타입 불일치 발생 - Entity와 Kafka 메시지 간 타입 일관성 확보 - 런타임 타입 변환 오류 방지 영향: - Event Service 내부 일관성 확보 - 향후 타 서비스와의 통합 시 UUID 표준 준비 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
89a86c1301
commit
cf2689390d
@ -7,6 +7,7 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 이벤트 생성 완료 메시지 DTO
|
||||
@ -20,16 +21,16 @@ import java.time.LocalDateTime;
|
||||
public class EventCreatedMessage {
|
||||
|
||||
/**
|
||||
* 이벤트 ID
|
||||
* 이벤트 ID (UUID)
|
||||
*/
|
||||
@JsonProperty("event_id")
|
||||
private Long eventId;
|
||||
private UUID eventId;
|
||||
|
||||
/**
|
||||
* 사용자 ID
|
||||
* 사용자 ID (UUID)
|
||||
*/
|
||||
@JsonProperty("user_id")
|
||||
private Long userId;
|
||||
private UUID userId;
|
||||
|
||||
/**
|
||||
* 이벤트 제목
|
||||
|
||||
@ -29,12 +29,12 @@ public class EventKafkaProducer {
|
||||
/**
|
||||
* 이벤트 생성 완료 메시지 발행
|
||||
*
|
||||
* @param eventId 이벤트 ID
|
||||
* @param userId 사용자 ID
|
||||
* @param eventId 이벤트 ID (UUID)
|
||||
* @param userId 사용자 ID (UUID)
|
||||
* @param title 이벤트 제목
|
||||
* @param eventType 이벤트 타입
|
||||
*/
|
||||
public void publishEventCreated(Long eventId, Long userId, String title, String eventType) {
|
||||
public void publishEventCreated(java.util.UUID eventId, java.util.UUID userId, String title, String eventType) {
|
||||
EventCreatedMessage message = EventCreatedMessage.builder()
|
||||
.eventId(eventId)
|
||||
.userId(userId)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user