MCPcopy
hub / github.com/IBM/sarama / isRetriableClaimError

Function isRetriableClaimError

consumer_group.go:1043–1050  ·  view source on GitHub ↗

isRetriableClaimError reports whether err from newConsumerGroupClaim is a transient condition worth retrying after a metadata refresh

(err error)

Source from the content-addressed store, hash-verified

1041// isRetriableClaimError reports whether err from newConsumerGroupClaim is
1042// a transient condition worth retrying after a metadata refresh
1043func isRetriableClaimError(err error) bool {
1044 return errors.Is(err, ErrNotConnected) ||
1045 errors.Is(err, ErrLeaderNotAvailable) ||
1046 errors.Is(err, ErrNotLeaderForPartition) ||
1047 errors.Is(err, ErrFencedLeaderEpoch) ||
1048 errors.Is(err, ErrUnknownLeaderEpoch) ||
1049 errors.Is(err, ErrReplicaNotAvailable)
1050}
1051
1052func (s *consumerGroupSession) consume(topic string, partition int32) {
1053 // quick exit if rebalance is due

Callers 1

newClaimWithRetryMethod · 0.85

Calls 1

IsMethod · 0.80

Tested by

no test coverage detected