Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task
DDonghyeo opened this issue Jul 5, 2024 · 0 comments
Open
1 task

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

DDonghyeo opened this issue Jul 5, 2024 · 0 comments
Assignees
Labels
bug Something isn't working fix

Comments

@DDonghyeo
Copy link
Member

DDonghyeo commented Jul 5, 2024

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/

@DDonghyeo DDonghyeo added bug Something isn't working fix labels Jul 5, 2024
@DDonghyeo DDonghyeo self-assigned this Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix
Projects
None yet
Development

No branches or pull requests

1 participant