Error 발생
→ [Consumer clientId=consumer-notification-consumer-6, groupId=notification-consumer] Seeking to offset 19 for partition chatting-create-0
→ Backoff FixedBackOff{interval=0, currentAttempts=10, maxAttempts=9} exhausted for chatting-create-0@19
→ [Consumer clientId=consumer-notification-consumer-6, groupId=notification-consumer] Seeking to offset 20 for partition chatting-create-0
→ Backoff FixedBackOff{interval=0, currentAttempts=10, maxAttempts=9} exhausted for chatting-create-0@20
원인
ListenerExecutionFailedException
오류는 리스너가 반복적으로 실패하고 있다는 의미. 기본적으로 FixedBackOff
전략을 사용하고 있는데, 이 방식은 10번의 재시도 후 더 이상 시도를 하지 않도록 설정notification.getReceiverUuidList().forEach(receiverUuid -> {
log.info("Sending notification to user: {}", receiverUuid);
sendFeedNotification(receiverUuid, notification); // SSE 알림 전송
fcmTokenRepository.findByUuid(receiverUuid).get().getFcmTokenList().forEach(token -> {
log.info("Sending push notification to user: {}", receiverUuid);
log.info("Sending push notification to token: {}", token);
sendPushFeedNotification(token, notification); // FCM 푸시 알림 전송
});
});
**findByUuid(receiverUuid)
**가 결과를 반환하지 않을 경우 Optional.empty()
상태에서 **get()
**을 호출하면 ****NoSuchElementException
****이 발생하게 됩니다. 이 예외가 메시지를 처리하지 못한 상태로 이어지며, Kafka는 메시지를 재시도 요청