heart beat thread
- consumer와 group coordinator와의 연결 상태를 주기적으로 유지하는 역할을 하는 background thread이다.
- consumer의 활성 상태 확인
- session time out 감지
- rebalancing감지
- group coordinator가 group안에서 rebalancing 시작하면, heart beat thread는 consumer에게 이를 알려줌.
- 이를 전달 받은 consumer는 할당된 partition의 처리를 멈추고 새로운 partition할당을 기다림
- group coordinator가 group안에서 rebalancing 시작하면, heart beat thread는 consumer에게 이를 알려줌.
- heartbeat.interval.ms
- heartbeat 신호를 보내는 간격. default= 3000ms
- session.timeout.ms
- consumer를 timeout시키는 시간. default=10000ms
- max.poll.interval.ms
- 메시지를 풀링하는데 최대 시간 간격.
- 이 시간안에 풀링을 안하면 rebalancing. default=300000ms
props.setProperty(ConsumerConfig.HEARTBEAT_INTERVAL_MS_CONFIG , "5000");
props.setProperty(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG , "500000");
props.setProperty(ConsumerConfig.MAX_POLL_INTERVAL_MS_CONFIG , "600000");'리눅스 > kafka' 카테고리의 다른 글
| consumer partition 할당 전략 종류( range , roundRobin , sticky , cooperative sticky ) (1) | 2024.10.21 |
|---|---|
| kafka rebalacing의 프로토콜, Eager 모드 및 cooperative 모드 (0) | 2024.10.21 |
| group coordinator , static group membership (0) | 2024.10.20 |
| kafka에서 새로운 consumer가 들어오면 rebalance 되는 과정에 대해서 (7) | 2024.10.20 |
| __consumer_offsets , auto.offset.reset (0) | 2024.10.19 |