KubeMQ
ConnectorsKafkaReference

Error Codes

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

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. This includes a Metadata lookup that asked not to auto-create — AdminClient's describeTopics, and librdkafka consumers by default — for a topic that does not exist. A producer's lookup still auto-creates on first write, as Apache Kafka's auto.create.topics.enable does.
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), or the whole request exceeds MaxRequestBytes (default 100 MiB), in which case every partition in it carries this code and the connection stays open. 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_IDA group.id no KubeMQ consumer could join: empty, longer than 249 bytes, not valid UTF-8, containing /, * or >, with a leading or trailing dot, or containing ... Answered by JoinGroup, Heartbeat, SyncGroup, LeaveGroup, OffsetCommit, OffsetFetch, AddOffsetsToTxn and TxnOffsetCommit. Non-retriable.
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 CreateTopics asked for more replicas than there are nodes (Replication factor: 3 larger than available brokers: 1.), or for 0 or a negative value other than -1 — the same rule as Apache Kafka. Any value up to the node count is accepted.
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

CodeErrorWhat triggers it
15COORDINATOR_NOT_AVAILABLECreating one more share group than CONNECTORS_KAFKA_MAX_GROUPS allows — by a first join or by setting a new group's start offsets. Nothing is created. Retriable; it succeeds once unused share groups are deleted or the cap is raised.
24INVALID_GROUP_IDShareGroupHeartbeat or AlterShareGroupOffsets named a group id no KubeMQ consumer could join (containing /, * or >, a leading or trailing dot, .., or empty) or one that is not valid UTF-8. The classic group APIs refuse the same ids — see Consumer-group coordinator. Nothing is stored. Non-retriable.
35UNSUPPORTED_VERSIONWhile CONNECTORS_KAFKA_SHARE_FEATURE_VERSION is 1 (a rolling-upgrade setting): deleting a share group, or AlterShareGroupOffsets creating a group's first start offset.
40INVALID_CONFIGA lock-duration, session-timeout or heartbeat-interval value outside its allowed range; an invalid share.auto.offset.reset or share.isolation.level value; an unknown group config key; an APPEND or SUBTRACT operation; or any change to share.assignment.interval.ms. The delivery-count limit and the record-lock cap are clamped into range, never refused — see Per-group configuration.
44POLICY_VIOLATIONA per-group share config write (kafka-configs.sh --entity-type groups) that would give one more group stored configuration than CONNECTORS_KAFKA_MAX_GROUPS allows. Nothing is written. Non-retriable: stored group configuration is never removed, so only raising the cap lets the write succeed. A group that already holds configuration is never subject to the cap.
42INVALID_REQUESTAcknowledgement ranges that overlap, run backwards, or start below zero (none of that partition's acknowledgements are applied); a group id that is not valid UTF-8 on ShareFetch, ShareAcknowledge or a group-config request; and, while CONNECTORS_KAFKA_SHARE_FEATURE_VERSION is 1, a read_committed group's fetch or any group-config write.
68NON_EMPTY_GROUPDeleteGroups, AlterShareGroupOffsets or DeleteShareGroupOffsets on a share group that still has a consumer attached. Stop the consumer, then retry.
69GROUP_ID_NOT_FOUNDThe group id is in use as the other group type — a share-group request for a classic group (message "Group X is not a share group."), or JoinGroup/OffsetCommit/TxnOffsetCommit for a share group. Non-retriable.
121INVALID_RECORD_STATEAn Accept, Release or Reject for a record another consumer now holds (nothing is applied); a renew for a record this consumer does not currently hold (released, lock expired, already acknowledged, or never acquired); or any renew when the group sets share.renew.acknowledge.enable=false or CONNECTORS_KAFKA_SHARE_FEATURE_VERSION is 1.
123INVALID_SHARE_SESSION_EPOCHA ShareFetch arrived for a share session the broker no longer holds — a failover, or the session was reaped — or named a member or session the coordinator has never seen. The client resets and reopens at epoch 0.

A late acknowledgement for a record nobody holds any more is not refused 121 on KubeMQ, where Kafka refuses it — see the share-group differences.

Was this page helpful?

On this page