Skip to content

Commit 6a864e0

Browse files
committed
log RebalanceInProgress in ConsumerGroup#heartbeat as warning
Resolves #847
1 parent 51b69e9 commit 6a864e0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/kafka/consumer_group.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,12 @@ def heartbeat
113113

114114
Protocol.handle_error(response.error_code)
115115
end
116-
rescue ConnectionError, UnknownMemberId, RebalanceInProgress, IllegalGeneration => e
116+
rescue ConnectionError, UnknownMemberId, IllegalGeneration => e
117117
@logger.error "Error sending heartbeat: #{e}"
118118
raise HeartbeatError, e
119+
rescue RebalanceInProgress => e
120+
@logger.warn "Error sending heartbeat: #{e}"
121+
raise HeartbeatError, e
119122
rescue NotCoordinatorForGroup
120123
@logger.error "Failed to find coordinator for group `#{@group_id}`; retrying..."
121124
sleep 1

0 commit comments

Comments
 (0)