KubeMQ
ConnectorsKafkaReference

Error Codes

The Kafka protocol error codes the connector returns — UNSUPPORTED_VERSION, INVALID_PARTITIONS, transaction and authorization codes, and MESSAGE_TOO_LARGE.

The KubeMQ Kafka connector answers every failure with a standard Kafka protocol error code — the same numeric ErrorCode field (top-level, per-partition, or per-resource, depending on the API) a stock Kafka client already knows how to interpret. There is no custom error vocabulary: branch your client's retry/reconfigure logic on the numeric code exactly as you would against real Kafka.

Retriable vs. non-retriable. Codes marked retriable reflect a transient condition — the broker isn't ready, a race was lost, a coordinator pointer is stale — that a client's normal backoff-and-retry resolves. Non-retriable means resending the identical request will never succeed; something has to change first.

Version negotiation

CodeErrorWhat triggers it
35UNSUPPORTED_VERSIONThe request's version falls outside that key's advertised [min, max] window (see Capabilities). Encoded at the key's max version so the client can parse it and renegotiate via ApiVersions.

Produce and fetch (data plane)

CodeErrorWhat triggers it
1OFFSET_OUT_OF_RANGEFetch/ListOffsets requested an offset below the log start or above the high watermark — never used for a valid empty fetch at offset 0. Non-retriable at that offset.
2CORRUPT_MESSAGEA Produce batch failed decode — CRC mismatch, an incomplete/oversized batch, a bad Magic byte, or a negative FirstSequence from an idempotent producer. Non-retriable.
3UNKNOWN_TOPIC_OR_PARTITIONThe topic or partition doesn't exist and auto-create didn't apply.
5LEADER_NOT_AVAILABLEThe broker isn't accepting traffic yet — still starting, or a just-promoted leader catching up on Raft. Retriable.
6NOT_LEADER_OR_FOLLOWERA clustered follower answers this on Fetch so the client's metadata refresh re-routes it to the leader. Retriable.
10MESSAGE_TOO_LARGEA Produce partition's Records exceed MaxMessageBytes (default 1 MiB). Non-retriable — the producer must reconfigure.
17INVALID_TOPIC_EXCEPTIONThe topic name fails KubeMQ's channel-name validation — kept distinct from an authorization deny so it never leaks "denied" to an unauthorized caller.
21INVALID_REQUIRED_ACKSProduce's Acks is set to something other than 0, 1, or -1. Unreachable by a conformant client. Non-retriable.
45OUT_OF_ORDER_SEQUENCE_NUMBERAn idempotent producer's per-(PID, partition) sequence check found a gap.
46DUPLICATE_SEQUENCE_NUMBERThe same (PID, partition) sequence was already accepted — the connector dedups the retry.
59UNKNOWN_PRODUCER_IDThe batch's producer ID has no live sequence-tracking record — expired, or never seen.
74FENCED_LEADER_EPOCHThe client's CurrentLeaderEpoch is older than the partition's live epoch. Retriable.
75UNKNOWN_LEADER_EPOCHThe client's CurrentLeaderEpoch is newer than what this node knows. Retriable.
100UNKNOWN_TOPIC_IDA Metadata v10+ request named a TopicID (KIP-516) that doesn't resolve to any discoverable topic.

Consumer-group coordinator

CodeErrorWhat triggers it
14COORDINATOR_LOAD_IN_PROGRESSThe durable offset store hasn't finished replaying at boot. Retriable — a background sweep retries until it succeeds.
15COORDINATOR_NOT_AVAILABLEThe broker isn't accepting group-coordinator traffic yet. Retriable.
16NOT_COORDINATORThis node isn't the caught-up Raft leader for the group; surfaces only when the leader-proxy hop fails. Retriable.
22ILLEGAL_GENERATIONA Join/Sync/Heartbeat names a generation the coordinator has already moved past.
23INCONSISTENT_GROUP_PROTOCOLThe group's members can't agree on a common protocol/assignor during a rebalance.
24INVALID_GROUP_IDAn empty group.id.
25UNKNOWN_MEMBER_IDThe presented member.id is unknown — never joined, already reaped, or an unrecognized static-instance mapping.
26INVALID_SESSION_TIMEOUTJoinGroupRequest.SessionTimeoutMillis falls outside the coordinator's accepted bounds.
27REBALANCE_IN_PROGRESSThe group is (now) rebalancing — the member must rejoin.
68NON_EMPTY_GROUPDeleteGroups targeted a non-Empty group, or OffsetDelete targeted an active non-consumer-protocol group.
69GROUP_ID_NOT_FOUNDThe named group is unknown to the registry and the durable offset store, or its state is Dead.
79MEMBER_ID_REQUIREDKIP-394's two-round JoinGroup handshake: an empty-MemberID round-1 request (v4+) gets a freshly minted ID and this code; the client resends with it.
81GROUP_MAX_SIZE_REACHEDThe group, or the coordinator-wide group cap, is already at its configured ceiling.
82FENCED_INSTANCE_IDKIP-345 static membership: group.instance.id maps to a different member.id than the requester — a displaced or duplicate static instance.
86GROUP_SUBSCRIBED_TO_TOPICOffsetDelete targeted a (topic, partition) a live member still subscribes to — deleting it would rewind that consumer.
88UNSTABLE_OFFSET_COMMITOffsetFetch set RequireStable (v7+) while the group holds a staged, uncommitted transactional offset. Retriable.

Topic and partition admin

CodeErrorWhat triggers it
36TOPIC_ALREADY_EXISTSCreateTopics named a topic that already exists.
37INVALID_PARTITIONSCreatePartitions requested a same-or-lower count, or one above the 256-partition cap; also CreateTopics's NumPartitions over that cap.
38INVALID_REPLICATION_FACTORA request asked for ReplicationFactor > 1 — replication is internal to Raft, never exposed as separate Kafka replicas.
40INVALID_CONFIGAn unsupported config value — an invalid cleanup.policy, message.timestamp.type=LogAppendTime, or an APPEND/SUBTRACT op on a scalar config.
41NOT_CONTROLLERAn admin write landed on a node that isn't the caught-up leader. Retriable — the client retries against the controller.
42INVALID_REQUESTA malformed field — most commonly a present-but-empty transactional.id, or one failing channel-name validation.

Transactions

CodeErrorWhat triggers it
47INVALID_PRODUCER_EPOCHA Produce arrived with an epoch below the live epoch on record — a zombie holding a stale epoch. Non-retriable; the producer must re-run InitProducerId.
48INVALID_TXN_STATEA transactional batch arrived in the wrong coordinator state; also reused by AddPartitionsToTxn/AddOffsetsToTxn/EndTxn/TxnOffsetCommit for their own state violations.
49INVALID_PRODUCER_ID_MAPPINGA KIP-360 request named a (transactional.id, PID) pair with no durable record — the ID is new, or was tombstoned since the client last saw it.
50INVALID_TRANSACTION_TIMEOUTTransactionTimeoutMillis is <= 0 or exceeds the coordinator-wide ceiling.
51CONCURRENT_TRANSACTIONSTwo state/epoch-transition attempts raced for the same transactional.id. Retriable.
53TRANSACTIONAL_ID_AUTHORIZATION_FAILEDThe principal lacks Write on the transactional.id resource.
55OPERATION_NOT_ATTEMPTEDAddPartitionsToTxn named a partition that doesn't exist alongside ones that do — the existing ones answer this instead of a false success.
87INVALID_RECORDA client submitted a control batch — those are broker-internal; the only real producer is the coordinator's own commit/abort marker.
90PRODUCER_FENCEDA KIP-360 InitProducerId epoch is strictly above the live durable epoch — the only branch that answers 90.

KIP-890 transaction protocol V2 is not shipped — no per-EndTxn epoch bump. EndTxn writes a real in-log COMMIT/ABORT marker, but soundness stays bounded to the V1 wire scope in Capabilities.

Authorization

CodeErrorWhat triggers it
29TOPIC_AUTHORIZATION_FAILEDThe principal lacks the required topic ACL — Produce needs Write; Fetch/ListOffsets/OffsetFetch need Read.
30GROUP_AUTHORIZATION_FAILEDThe principal lacks the required group ACL — OffsetCommit/OffsetDelete/DeleteGroups need Write; Join/Sync/Heartbeat/Leave/DescribeGroups need Read.
31CLUSTER_AUTHORIZATION_FAILEDThe principal lacks Describe on the cluster resource — e.g. DescribeCluster(60).

Every authorization deny above is non-retriable — re-authenticate or request a policy grant rather than retry unchanged.

SASL

CodeErrorWhat triggers it
33UNSUPPORTED_SASL_MECHANISMThe client's SASLHandshake names a mechanism this listener doesn't offer — for example, OAUTHBEARER on the plaintext listener (TLS-only). The response still lists supported mechanisms; the connection stays open.
34ILLEGAL_SASL_STATESASLAuthenticate arrived before a successful SASLHandshake selected a mechanism.
58SASL_AUTHENTICATION_FAILEDCredentials didn't validate — unknown user or wrong password/token, deliberately indistinguishable to the client. The connection is closed.

Security and resource admin

CodeErrorWhat triggers it
54SECURITY_DISABLEDA SCRAM-credential or ACL mutation was refused — both are config-managed (Connectors.Kafka.Credentials), not runtime-mutable. Also answered when authorization is off entirely.
61DELEGATION_TOKEN_AUTH_DISABLEDAny delegation-token request — KubeMQ does not implement delegation tokens; switch those principals to SASL/SCRAM or mTLS.
91RESOURCE_NOT_FOUNDDescribeUserScramCredentials named a user with no SCRAM credentials configured. Non-retriable.

Share groups (preview)

CodeErrorWhat triggers it
123INVALID_SHARE_SESSION_EPOCHAn incremental ShareFetch arrived for a share session the broker no longer holds — a failover, or the session was reaped. The client resets and reopens at epoch 0.

Was this page helpful?

On this page