Description
We observed heavy logging while trying to join consumer group during partial unavailability of Kafka cluster (it's part of our testing process). Seems that rebalanceConfig.retryBackoffMs used in org.apache.kafka.clients.consumer.internals.AbstractCoordinator#joinGroupIfNeeded is not respected. Debugging revealed that Timer instance technically is expired thus using sleep of 0 milliseconds which defeats the purpose of backoff timeout.
Minimal backoff timeout should be respected.
2021-03-30 08:30:24,488 INFO [fs2-kafka-consumer-41][o.a.k.c.c.i.AbstractCoordinator] [Consumer clientId=app_clientid, groupId=consumer-group] JoinGroup failed: Coordinator 127.0.0.1:9092 (id: 2147483634 rack: null) is loading the group. 2021-03-30 08:30:24,488 INFO [fs2-kafka-consumer-41][o.a.k.c.c.i.AbstractCoordinator] [Consumer clientId=app_clientid, groupId=consumer-group] Rebalance failed. org.apache.kafka.common.errors.CoordinatorLoadInProgressException: The coordinator is loading and hence can't process requests. 2021-03-30 08:30:24,488 INFO [fs2-kafka-consumer-41][o.a.k.c.c.i.AbstractCoordinator] [Consumer clientId=app_clientid, groupId=consumer-group] (Re-)joining group 2021-03-30 08:30:24,489 INFO [fs2-kafka-consumer-41][o.a.k.c.c.i.AbstractCoordinator] [Consumer clientId=app_clientid, groupId=consumer-group] JoinGroup failed: Coordinator 127.0.0.1:9092 (id: 2147483634 rack: null) is loading the group. 2021-03-30 08:30:24,489 INFO [fs2-kafka-consumer-41][o.a.k.c.c.i.AbstractCoordinator] [Consumer clientId=app_clientid, groupId=consumer-group] Rebalance failed. org.apache.kafka.common.errors.CoordinatorLoadInProgressException: The coordinator is loading and hence can't process requests. 2021-03-30 08:30:24,489 INFO [fs2-kafka-consumer-41][o.a.k.c.c.i.AbstractCoordinator] [Consumer clientId=app_clientid, groupId=consumer-group] (Re-)joining group 2021-03-30 08:30:24,490 INFO [fs2-kafka-consumer-41][o.a.k.c.c.i.AbstractCoordinator] [Consumer clientId=app_clientid, groupId=consumer-group] JoinGroup failed: Coordinator 127.0.0.1:9092 (id: 2147483634 rack: null) is loading the group. 2021-03-30 08:30:24,490 INFO [fs2-kafka-consumer-41][o.a.k.c.c.i.AbstractCoordinator] [Consumer clientId=app_clientid, groupId=consumer-group] Rebalance failed. org.apache.kafka.common.errors.CoordinatorLoadInProgressException: The coordinator is loading and hence can't process requests. 2021-03-30 08:30:24,490 INFO [fs2-kafka-consumer-41][o.a.k.c.c.i.AbstractCoordinator] [Consumer clientId=app_clientid, groupId=consumer-group] (Re-)joining group 2021-03-30 08:30:24,491 INFO [fs2-kafka-consumer-41][o.a.k.c.c.i.AbstractCoordinator] [Consumer clientId=app_clientid, groupId=consumer-group] JoinGroup failed: Coordinator 127.0.0.1:9092 (id: 2147483634 rack: null) is loading the group. 2021-03-30 08:30:24,491 INFO [fs2-kafka-consumer-41][o.a.k.c.c.i.AbstractCoordinator] [Consumer clientId=app_clientid, groupId=consumer-group] Rebalance failed. org.apache.kafka.common.errors.CoordinatorLoadInProgressException: The coordinator is loading and hence can't process requests. 2021-03-30 08:30:24,491 INFO [fs2-kafka-consumer-41][o.a.k.c.c.i.AbstractCoordinator] [Consumer clientId=app_clientid, groupId=consumer-group] (Re-)joining group 2021-03-30 08:30:24,492 INFO [fs2-kafka-consumer-41][o.a.k.c.c.i.AbstractCoordinator] [Consumer clientId=app_clientid, groupId=consumer-group] JoinGroup failed: Coordinator 127.0.0.1:9092 (id: 2147483634 rack: null) is loading the group. 2021-03-30 08:30:24,492 INFO [fs2-kafka-consumer-41][o.a.k.c.c.i.AbstractCoordinator] [Consumer clientId=app_clientid, groupId=consumer-group] Rebalance failed. org.apache.kafka.common.errors.CoordinatorLoadInProgressException: The coordinator is loading and hence can't process requests. 2021-03-30 08:30:24,492 INFO [fs2-kafka-consumer-41][o.a.k.c.c.i.AbstractCoordinator] [Consumer clientId=app_clientid, groupId=consumer-group] (Re-)joining group
Attachments
Issue Links
- is duplicated by
-
KAFKA-12640 AbstractCoordinator ignores backoff timeout when joining the consumer group
- Resolved
- links to