Skip to content

🐛 fix: Kafka Consumer 그룹 제외 이슈 해결 #143

@DDonghyeo

Description

@DDonghyeo

Title

  • Kafka Consumer 그룹 제외 이슈

Content

2024-07-05T17:17:02.766+09:00  INFO 1 --- [noti-service] [           main] c.w.notiservice.NotiServiceApplication   : Started NotiServiceApplication in 14.591 seconds (process running for 15.895)
2024-07-05T17:22:01.719+09:00  INFO 1 --- [noti-service] [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2024-07-05T17:26:02.380+09:00  INFO 1 --- [noti-service] [ntainer#2-0-C-1] org.apache.kafka.clients.NetworkClient   : [Consumer clientId=consumer-notice_1-1, groupId=notice_1] Node -1 disconnected.
2024-07-05T17:26:02.394+09:00  INFO 1 --- [noti-service] [ntainer#2-1-C-1] org.apache.kafka.clients.NetworkClient   : [Consumer clientId=consumer-notice_1-2, groupId=notice_1] Node -1 disconnected.

Kafka Consumer가 잘 구독 되었다가 몇 분 뒤에 브로커와 연결이 끊기는 오류 발생.

가설 1

image

Consumer 가 poll을 요청한 뒤

max.poll.interval.ms: 기본값 300000(5분)
max.poll.records: 기본값 500

우리 서버 설정 :
max.poll.records: 기본값 100

Consumer가 레코드를 처리하는 시간이 timeout되면 리밸런싱(rebalancing)이 일어남,
컨슈머가 문제가 있다고 판단하여 컨슈머 그룹에서 제외하게 되는 상황 발생.

TODO

  • Kafka Conumer 예외처리 변경

etc

https://saramin.github.io/2019-09-17-kafka/

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions