blob: b9f68d8244987b7508d1d92c650d133d60f527a6 [file] [log] [blame]
khenaidooac637102019-01-14 15:44:34 -05001package kafka
2// Copyright 2016 Confluent Inc.
3// AUTOMATICALLY GENERATED BY /home/maglun/gocode/bin/go_rdkafka_generr ON 2018-10-11 09:26:58.938371378 +0200 CEST m=+0.001256618 USING librdkafka 0.11.5
4
5/*
6#include <librdkafka/rdkafka.h>
7*/
8import "C"
9
10// ErrorCode is the integer representation of local and broker error codes
11type ErrorCode int
12
13// String returns a human readable representation of an error code
14func (c ErrorCode) String() string {
15 return C.GoString(C.rd_kafka_err2str(C.rd_kafka_resp_err_t(c)))
16}
17
18const (
19 // ErrBadMsg Local: Bad message format
20 ErrBadMsg ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__BAD_MSG)
21 // ErrBadCompression Local: Invalid compressed data
22 ErrBadCompression ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__BAD_COMPRESSION)
23 // ErrDestroy Local: Broker handle destroyed
24 ErrDestroy ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__DESTROY)
25 // ErrFail Local: Communication failure with broker
26 ErrFail ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__FAIL)
27 // ErrTransport Local: Broker transport failure
28 ErrTransport ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__TRANSPORT)
29 // ErrCritSysResource Local: Critical system resource failure
30 ErrCritSysResource ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE)
31 // ErrResolve Local: Host resolution failure
32 ErrResolve ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__RESOLVE)
33 // ErrMsgTimedOut Local: Message timed out
34 ErrMsgTimedOut ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__MSG_TIMED_OUT)
35 // ErrPartitionEOF Broker: No more messages
36 ErrPartitionEOF ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__PARTITION_EOF)
37 // ErrUnknownPartition Local: Unknown partition
38 ErrUnknownPartition ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION)
39 // ErrFs Local: File or filesystem error
40 ErrFs ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__FS)
41 // ErrUnknownTopic Local: Unknown topic
42 ErrUnknownTopic ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC)
43 // ErrAllBrokersDown Local: All broker connections are down
44 ErrAllBrokersDown ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN)
45 // ErrInvalidArg Local: Invalid argument or configuration
46 ErrInvalidArg ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__INVALID_ARG)
47 // ErrTimedOut Local: Timed out
48 ErrTimedOut ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__TIMED_OUT)
49 // ErrQueueFull Local: Queue full
50 ErrQueueFull ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__QUEUE_FULL)
51 // ErrIsrInsuff Local: ISR count insufficient
52 ErrIsrInsuff ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__ISR_INSUFF)
53 // ErrNodeUpdate Local: Broker node update
54 ErrNodeUpdate ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__NODE_UPDATE)
55 // ErrSsl Local: SSL error
56 ErrSsl ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__SSL)
57 // ErrWaitCoord Local: Waiting for coordinator
58 ErrWaitCoord ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__WAIT_COORD)
59 // ErrUnknownGroup Local: Unknown group
60 ErrUnknownGroup ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__UNKNOWN_GROUP)
61 // ErrInProgress Local: Operation in progress
62 ErrInProgress ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__IN_PROGRESS)
63 // ErrPrevInProgress Local: Previous operation in progress
64 ErrPrevInProgress ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS)
65 // ErrExistingSubscription Local: Existing subscription
66 ErrExistingSubscription ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION)
67 // ErrAssignPartitions Local: Assign partitions
68 ErrAssignPartitions ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS)
69 // ErrRevokePartitions Local: Revoke partitions
70 ErrRevokePartitions ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS)
71 // ErrConflict Local: Conflicting use
72 ErrConflict ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__CONFLICT)
73 // ErrState Local: Erroneous state
74 ErrState ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__STATE)
75 // ErrUnknownProtocol Local: Unknown protocol
76 ErrUnknownProtocol ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL)
77 // ErrNotImplemented Local: Not implemented
78 ErrNotImplemented ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED)
79 // ErrAuthentication Local: Authentication failure
80 ErrAuthentication ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__AUTHENTICATION)
81 // ErrNoOffset Local: No offset stored
82 ErrNoOffset ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__NO_OFFSET)
83 // ErrOutdated Local: Outdated
84 ErrOutdated ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__OUTDATED)
85 // ErrTimedOutQueue Local: Timed out in queue
86 ErrTimedOutQueue ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE)
87 // ErrUnsupportedFeature Local: Required feature not supported by broker
88 ErrUnsupportedFeature ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE)
89 // ErrWaitCache Local: Awaiting cache update
90 ErrWaitCache ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__WAIT_CACHE)
91 // ErrIntr Local: Operation interrupted
92 ErrIntr ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__INTR)
93 // ErrKeySerialization Local: Key serialization error
94 ErrKeySerialization ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__KEY_SERIALIZATION)
95 // ErrValueSerialization Local: Value serialization error
96 ErrValueSerialization ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION)
97 // ErrKeyDeserialization Local: Key deserialization error
98 ErrKeyDeserialization ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION)
99 // ErrValueDeserialization Local: Value deserialization error
100 ErrValueDeserialization ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION)
101 // ErrPartial Local: Partial response
102 ErrPartial ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__PARTIAL)
103 // ErrReadOnly Local: Read-only object
104 ErrReadOnly ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__READ_ONLY)
105 // ErrNoent Local: No such entry
106 ErrNoent ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__NOENT)
107 // ErrUnderflow Local: Read underflow
108 ErrUnderflow ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__UNDERFLOW)
109 // ErrInvalidType Local: Invalid type
110 ErrInvalidType ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR__INVALID_TYPE)
111 // ErrUnknown Unknown broker error
112 ErrUnknown ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_UNKNOWN)
113 // ErrNoError Success
114 ErrNoError ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_NO_ERROR)
115 // ErrOffsetOutOfRange Broker: Offset out of range
116 ErrOffsetOutOfRange ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE)
117 // ErrInvalidMsg Broker: Invalid message
118 ErrInvalidMsg ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INVALID_MSG)
119 // ErrUnknownTopicOrPart Broker: Unknown topic or partition
120 ErrUnknownTopicOrPart ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART)
121 // ErrInvalidMsgSize Broker: Invalid message size
122 ErrInvalidMsgSize ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE)
123 // ErrLeaderNotAvailable Broker: Leader not available
124 ErrLeaderNotAvailable ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE)
125 // ErrNotLeaderForPartition Broker: Not leader for partition
126 ErrNotLeaderForPartition ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION)
127 // ErrRequestTimedOut Broker: Request timed out
128 ErrRequestTimedOut ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT)
129 // ErrBrokerNotAvailable Broker: Broker not available
130 ErrBrokerNotAvailable ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE)
131 // ErrReplicaNotAvailable Broker: Replica not available
132 ErrReplicaNotAvailable ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE)
133 // ErrMsgSizeTooLarge Broker: Message size too large
134 ErrMsgSizeTooLarge ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE)
135 // ErrStaleCtrlEpoch Broker: StaleControllerEpochCode
136 ErrStaleCtrlEpoch ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH)
137 // ErrOffsetMetadataTooLarge Broker: Offset metadata string too large
138 ErrOffsetMetadataTooLarge ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE)
139 // ErrNetworkException Broker: Broker disconnected before response received
140 ErrNetworkException ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION)
141 // ErrGroupLoadInProgress Broker: Group coordinator load in progress
142 ErrGroupLoadInProgress ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_GROUP_LOAD_IN_PROGRESS)
143 // ErrGroupCoordinatorNotAvailable Broker: Group coordinator not available
144 ErrGroupCoordinatorNotAvailable ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_GROUP_COORDINATOR_NOT_AVAILABLE)
145 // ErrNotCoordinatorForGroup Broker: Not coordinator for group
146 ErrNotCoordinatorForGroup ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_NOT_COORDINATOR_FOR_GROUP)
147 // ErrTopicException Broker: Invalid topic
148 ErrTopicException ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION)
149 // ErrRecordListTooLarge Broker: Message batch larger than configured server segment size
150 ErrRecordListTooLarge ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE)
151 // ErrNotEnoughReplicas Broker: Not enough in-sync replicas
152 ErrNotEnoughReplicas ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS)
153 // ErrNotEnoughReplicasAfterAppend Broker: Message(s) written to insufficient number of in-sync replicas
154 ErrNotEnoughReplicasAfterAppend ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND)
155 // ErrInvalidRequiredAcks Broker: Invalid required acks value
156 ErrInvalidRequiredAcks ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS)
157 // ErrIllegalGeneration Broker: Specified group generation id is not valid
158 ErrIllegalGeneration ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION)
159 // ErrInconsistentGroupProtocol Broker: Inconsistent group protocol
160 ErrInconsistentGroupProtocol ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL)
161 // ErrInvalidGroupID Broker: Invalid group.id
162 ErrInvalidGroupID ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INVALID_GROUP_ID)
163 // ErrUnknownMemberID Broker: Unknown member
164 ErrUnknownMemberID ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID)
165 // ErrInvalidSessionTimeout Broker: Invalid session timeout
166 ErrInvalidSessionTimeout ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT)
167 // ErrRebalanceInProgress Broker: Group rebalance in progress
168 ErrRebalanceInProgress ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS)
169 // ErrInvalidCommitOffsetSize Broker: Commit offset data size is not valid
170 ErrInvalidCommitOffsetSize ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE)
171 // ErrTopicAuthorizationFailed Broker: Topic authorization failed
172 ErrTopicAuthorizationFailed ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED)
173 // ErrGroupAuthorizationFailed Broker: Group authorization failed
174 ErrGroupAuthorizationFailed ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED)
175 // ErrClusterAuthorizationFailed Broker: Cluster authorization failed
176 ErrClusterAuthorizationFailed ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED)
177 // ErrInvalidTimestamp Broker: Invalid timestamp
178 ErrInvalidTimestamp ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP)
179 // ErrUnsupportedSaslMechanism Broker: Unsupported SASL mechanism
180 ErrUnsupportedSaslMechanism ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM)
181 // ErrIllegalSaslState Broker: Request not valid in current SASL state
182 ErrIllegalSaslState ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE)
183 // ErrUnsupportedVersion Broker: API version not supported
184 ErrUnsupportedVersion ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION)
185 // ErrTopicAlreadyExists Broker: Topic already exists
186 ErrTopicAlreadyExists ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS)
187 // ErrInvalidPartitions Broker: Invalid number of partitions
188 ErrInvalidPartitions ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INVALID_PARTITIONS)
189 // ErrInvalidReplicationFactor Broker: Invalid replication factor
190 ErrInvalidReplicationFactor ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR)
191 // ErrInvalidReplicaAssignment Broker: Invalid replica assignment
192 ErrInvalidReplicaAssignment ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT)
193 // ErrInvalidConfig Broker: Configuration is invalid
194 ErrInvalidConfig ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INVALID_CONFIG)
195 // ErrNotController Broker: Not controller for cluster
196 ErrNotController ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_NOT_CONTROLLER)
197 // ErrInvalidRequest Broker: Invalid request
198 ErrInvalidRequest ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INVALID_REQUEST)
199 // ErrUnsupportedForMessageFormat Broker: Message format on broker does not support request
200 ErrUnsupportedForMessageFormat ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT)
201 // ErrPolicyViolation Broker: Isolation policy volation
202 ErrPolicyViolation ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_POLICY_VIOLATION)
203 // ErrOutOfOrderSequenceNumber Broker: Broker received an out of order sequence number
204 ErrOutOfOrderSequenceNumber ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER)
205 // ErrDuplicateSequenceNumber Broker: Broker received a duplicate sequence number
206 ErrDuplicateSequenceNumber ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER)
207 // ErrInvalidProducerEpoch Broker: Producer attempted an operation with an old epoch
208 ErrInvalidProducerEpoch ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH)
209 // ErrInvalidTxnState Broker: Producer attempted a transactional operation in an invalid state
210 ErrInvalidTxnState ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INVALID_TXN_STATE)
211 // ErrInvalidProducerIDMapping Broker: Producer attempted to use a producer id which is not currently assigned to its transactional id
212 ErrInvalidProducerIDMapping ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING)
213 // ErrInvalidTransactionTimeout Broker: Transaction timeout is larger than the maximum value allowed by the broker's max.transaction.timeout.ms
214 ErrInvalidTransactionTimeout ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT)
215 // ErrConcurrentTransactions Broker: Producer attempted to update a transaction while another concurrent operation on the same transaction was ongoing
216 ErrConcurrentTransactions ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS)
217 // ErrTransactionCoordinatorFenced Broker: Indicates that the transaction coordinator sending a WriteTxnMarker is no longer the current coordinator for a given producer
218 ErrTransactionCoordinatorFenced ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED)
219 // ErrTransactionalIDAuthorizationFailed Broker: Transactional Id authorization failed
220 ErrTransactionalIDAuthorizationFailed ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED)
221 // ErrSecurityDisabled Broker: Security features are disabled
222 ErrSecurityDisabled ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_SECURITY_DISABLED)
223 // ErrOperationNotAttempted Broker: Operation not attempted
224 ErrOperationNotAttempted ErrorCode = ErrorCode(C.RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED)
225)