No Active Consumers and lag in all partitions of a topic in one datacenter

Sometimes I run into a situation where I had to restart my API to consume messages from a datacenter

Here is the
We have 3 data centers (DC1, DC2 and DC3) and each datacenter has about 4 to 8 brokers. One Consumer (spring boot java api) having 10 instances(pods) consumes messages from a topic name say PROD-TOPIC that has 60 partitions and one consumer group say prod-consumer-group.

I am using @KafkaListerner annotation and do not have any customized polling logic. Also I am using default kafka settings.

On a normal situation, DC1 will have 5 consumer instances (12 partitions/pod), DC2 will have 3 consumer instances (20 Partitions/pod) and DC3 will have 2 consumer instances (30 partitions/pod) consuming messages.

Since DC3 has only 2 pods, due to issues when both pods having issues, api stops consuming message from that particular datacenter.

Issue –
Since the consumer taking longer than max.poll.interval.ms to process all the messages and particular pod will be considered inactive/dead and removed from the group

splunk log
[-consumer-group] g.g.k.c.c.internals.ConsumerCoordinator : [Consumer clientid=consumer-prod-consumer-group-1, groupld=prod-consumer-group] consumer poll timeout has expired. This means the time between subsequent calls to poll() was longer than the configured max.poll.interval.ms, which typically implies that the poll loop is spending too much time processing messages. You can address this either by increasing max.poll.interval.ms or by reducing the maximum size of batches returned in poll() with max.poll.records.

Sometime I see the following splunk message as well. Not sure what is the root cause

splunk log
Request joining group due to: rebalance failed due to 'The group member needs to have a valid member id before actually entering a consumer group.' (MemberidRequired Exception)

My questions are,

  1. Why doesn’t kafka rebalances the pods equally (almost) amoung each data centers say 3, 3 and 4 instead of 5, 3 and 2 (as in the case above).

  2. In the above case, when 2 pods in DC3 goes down, why kafka wouldn’t rebalances among remaining 8 pods so that each data centers gets 3, 3 and 2 pods?

Often I see no active consumers in one of the datacenter (especially DC3 where only two consumers assigned) and messages are keep piling up in each partitions.

  1. Will there be a data center maintenance or applying patches that could permanently kick the consumer out of the group?
I had to frequently restart all the pods so that rebalance happens and consumer starts consuming messages from all datacenter again

If I increase the number of pods to 12, Would kafka rebalances 4 pods with each datacenter ?

How about increasing the max.poll.interval.ms to 10 minutes to allow Consumer to process all fetched messages before the max.poll.interval.ms. Currently it is taking the default of 5 minutes (300000 ms)

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật