Temporary returns true if the operation that generated the error may succeed if retried at a later time. Kafka error documentation specifies these as "retriable" https://kafka.apache.org/protocol#protocol_error_codes
()
| 136 | // Kafka error documentation specifies these as "retriable" |
| 137 | // https://kafka.apache.org/protocol#protocol_error_codes |
| 138 | func (e Error) Temporary() bool { |
| 139 | switch e { |
| 140 | case InvalidMessage, |
| 141 | UnknownTopicOrPartition, |
| 142 | LeaderNotAvailable, |
| 143 | NotLeaderForPartition, |
| 144 | RequestTimedOut, |
| 145 | NetworkException, |
| 146 | GroupLoadInProgress, |
| 147 | GroupCoordinatorNotAvailable, |
| 148 | NotCoordinatorForGroup, |
| 149 | NotEnoughReplicas, |
| 150 | NotEnoughReplicasAfterAppend, |
| 151 | NotController, |
| 152 | KafkaStorageError, |
| 153 | FetchSessionIDNotFound, |
| 154 | InvalidFetchSessionEpoch, |
| 155 | ListenerNotFound, |
| 156 | FencedLeaderEpoch, |
| 157 | UnknownLeaderEpoch, |
| 158 | OffsetNotAvailable, |
| 159 | PreferredLeaderNotAvailable, |
| 160 | EligibleLeadersNotAvailable, |
| 161 | ElectionNotNeeded, |
| 162 | NoReassignmentInProgress, |
| 163 | GroupSubscribedToTopic, |
| 164 | UnstableOffsetCommit, |
| 165 | ThrottlingQuotaExceeded, |
| 166 | UnknownTopicID, |
| 167 | InconsistentTopicID, |
| 168 | FetchSessionTopicIDError: |
| 169 | return true |
| 170 | default: |
| 171 | return false |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | // Title returns a human readable title for the error. |
| 176 | func (e Error) Title() string { |