Expand description
Kafka’s exception classes (org.apache.kafka.common.errors).
Kafka’s exception classes.
Translates org.apache.kafka.common.errors. Each Java exception class is one
struct in its own file, named with the Exception -> Error substitution of
CLAUDE.md §2, and declares its extends chain through its
ErrorHierarchy impl rather
than through a predicate that enumerates it from the outside.
The error code for each class lives in its
ErrorCode impl — Java keeps the
same association in Errors’ CLASS_TO_ERROR map — while the default
message strings stay in Errors, exactly
as Java stores them on the enum constant and passes them to the class’s
constructor.
Re-exports§
pub use record_deserialization_error::DeserializationErrorOrigin;pub use record_deserialization_error::RecordDeserializationError;
Modules§
- record_
deserialization_ error - Translated from
org.apache.kafka.common.errors.RecordDeserializationException.
Structs§
- ApiError
- Any exception the broker can report through the protocol.
- Authentication
Error - Authentication failed.
- Authorization
Error - The client is not authorized to perform the operation.
- Authorizer
NotReady Error - The authorizer is not ready to serve the request yet; retrying may succeed.
- Broker
IdNot Registered Error - The given broker ID was not registered.
- Broker
NotAvailable Error - The broker is not available.
- Cluster
Authorization Error - Cluster authorization failed.
- Concurrent
Transactions Error - The producer attempted to update a transaction while another concurrent operation on the same transaction was ongoing.
- Controller
Moved Error - The controller moved to another broker.
- Coordinator
Load InProgress Error - The coordinator is loading and hence can’t process requests.
- Coordinator
NotAvailable Error - The coordinator is not available.
- Corrupt
Record Error - This message has failed its CRC checksum, exceeds the valid size, has a null key for a compacted topic, or is otherwise corrupt.
- Delegation
Token Authorization Error - Delegation Token authorization failed.
- Delegation
Token Disabled Error - Delegation Token feature is not enabled.
- Delegation
Token Expired Error - Delegation Token is expired.
- Delegation
Token NotFound Error - Delegation Token is not found on server.
- Delegation
Token Owner Mismatch Error - Specified Principal is not valid Owner/Renewer.
- Disconnect
Error - The connection to the broker was lost before a response arrived.
- Duplicate
Broker Registration Error - This broker ID is already in use.
- Duplicate
Resource Error - A request illegally referred to the same resource twice.
- Duplicate
Sequence Error - The broker received a duplicate sequence number.
- Duplicate
Voter Error - The voter is already part of the set of voters.
- Election
NotNeeded Error - Leader election not needed for topic partition.
- Eligible
Leaders NotAvailable Error - Eligible topic partition leaders are not available.
- Feature
Update Failed Error - Unable to update finalized features due to an unexpected server error.
- Fenced
Instance IdError - The broker rejected this static consumer since another consumer with the same group.instance.id has registered with a different member.id.
- Fenced
Leader Epoch Error - The leader epoch in the request is older than the epoch on the broker.
- Fenced
Member Epoch Error - The member epoch is fenced by the group coordinator. The member must abandon all its partitions and rejoin.
- Fenced
State Epoch Error - The share coordinator rejected the request because the share-group state epoch did not match.
- Fetch
Session IdNot Found Error - The fetch session ID was not found.
- Fetch
Session Topic IdError - The fetch session encountered inconsistent topic ID usage.
- Group
Authorization Error - Group authorization failure with the group ID.
- Group
IdNot Found Error - The group id does not exist.
- Group
MaxSize Reached Error - The group has reached its maximum size.
- Group
NotEmpty Error - The group is not empty.
- Group
Subscribed ToTopic Error - Deleting offsets of a topic is forbidden while the consumer group is actively subscribed to it.
- Illegal
Generation Error - Specified group generation id is not valid.
- Illegal
Sasl State Error - Request is not valid given the current SASL state.
- Inconsistent
Cluster IdError - The clusterId in the request does not match that found on the server.
- Inconsistent
Group Protocol Error - The group member’s supported protocols are incompatible with those of existing members or first group member tried to join with empty protocol type or empty protocol list.
- Inconsistent
Topic IdError - The log’s topic ID did not match the topic ID in the request.
- Inconsistent
Voter SetError - Indicates that the either the sender or recipient of a voter-only request is not one of the expected voters.
- Ineligible
Replica Error - The new ISR contains at least one ineligible replica.
- Interrupt
Error - A blocking operation was interrupted.
- Invalid
Commit Offset Size Error - The committing offset data size is not valid.
- Invalid
Configuration Error - Configuration is invalid.
- Invalid
Fetch Session Epoch Error - The fetch session epoch is invalid.
- Invalid
Fetch Size Error - The requested fetch size is invalid.
- Invalid
Group IdError - The group id is invalid.
- Invalid
Offset Error - No valid offset is available for the requested partition.
- Invalid
Partitions Error - Number of partitions is below 1.
- Invalid
PidMapping Error - The producer attempted to use a producer id which is not currently assigned to its transactional id.
- Invalid
Principal Type Error - Supplied principalType is not supported.
- Invalid
Producer Epoch Error - Producer attempted to produce with an old epoch.
- Invalid
Record State Error - The record state is invalid.
- Invalid
Registration Error - The controller has considered the broker registration to be invalid.
- Invalid
Regular Expression - The regular expression is not valid.
- Invalid
Replica Assignment Error - Replica assignment is invalid.
- Invalid
Replication Factor Error - Replication factor is below 1 or larger than the number of available brokers.
- Invalid
Request Error - This most likely occurs because of a request being malformed by the client library or the message was sent to an incompatible broker. See the broker logs for more details.
- Invalid
Required Acks Error - Produce request specified an invalid value for required acks.
- Invalid
Session Timeout Error - The session timeout is not within the range allowed by the broker (as configured by group.min.session.timeout.ms and group.max.session.timeout.ms).
- Invalid
Share Session Epoch Error - The share session epoch is invalid.
- Invalid
Timestamp Error - The timestamp of the message is out of acceptable range.
- Invalid
Topic Error - Invalid topic error with the set of invalid topics.
- Invalid
TxnState Error - The producer attempted a transactional operation in an invalid state.
- Invalid
TxnTimeout Error - The transaction timeout is larger than the maximum value allowed by the broker (as configured by transaction.max.timeout.ms).
- Invalid
Update Version Error - The given update version was invalid.
- Invalid
Voter KeyError - The voter key doesn’t match the receiving replica’s key.
- Kafka
Storage Error - Disk error when trying to access log file on the disk.
- Leader
NotAvailable Error - There is no leader for this topic-partition as we are in the middle of a leadership election.
- Listener
NotFound Error - There is no listener on the leader broker that matches the listener on which metadata request was processed.
- LogDir
NotFound Error - The user-specified log directory is not found in the broker config.
- Member
IdRequired Error - The group member needs to have a valid member id before actually entering a consumer group.
- Mismatched
Endpoint Type Error - The request was sent to an endpoint of the wrong type.
- Network
Error - The server disconnected before a response was received.
- NewLeader
Elected Error - The AlterPartition request successfully updated the partition state but the leader has changed.
- NoReassignment
InProgress Error - No partition reassignment is in progress.
- NotController
Error - This is not the correct controller for this cluster.
- NotCoordinator
Error - This is not the correct coordinator.
- NotEnough
Replicas After Append Error - Messages are written to the log, but to fewer in-sync replicas than required.
- NotEnough
Replicas Error - Messages are rejected since there are fewer in-sync replicas than required.
- NotLeader
OrFollower Error - For requests intended only for the leader, this error indicates that the broker is not the current leader. For requests intended for any replica, this error indicates that the broker is not a replica of the topic partition.
- Offset
Metadata TooLarge - The metadata field of the offset request was too large.
- Offset
Moved ToTiered Storage Error - The requested offset is moved to tiered storage.
- Offset
NotAvailable Error - The leader high watermark has not caught up from a recent leader election so the offsets cannot be guaranteed to be monotonically increasing.
- Offset
OutOf Range Error - The requested offset is not within the range of offsets maintained by the server.
- Operation
NotAttempted Error - The broker did not attempt to execute this operation. This may happen for batched RPCs where some operations in the batch failed, causing the broker to respond without trying the rest.
- OutOf
Order Sequence Error - The broker received an out of order sequence number.
- Policy
Violation Error - Request parameters do not satisfy the configured policy.
- Position
OutOf Range Error - Requested position is not greater than or equal to zero, and less than the size of the snapshot.
- Preferred
Leader NotAvailable Error - The preferred leader was not available.
- Principal
Deserialization Error - Request principal deserialization failed during forwarding.
- Producer
Fenced Error - There is a newer producer with the same transactionalId which fences the current one.
- Reassignment
InProgress Error - A partition reassignment is in progress.
- Rebalance
InProgress Error - The group is rebalancing, so a rejoin is needed.
- Rebootstrap
Required Error - Client metadata is stale. The client should rebootstrap to obtain new metadata.
- Record
Batch TooLarge Error - The request included message batch larger than the configured segment size on the server.
- Record
TooLarge Error - The request included a message larger than the max message size the server will accept.
- Replica
NotAvailable Error - The replica is not available for the requested topic-partition.
- Resource
NotFound Error - A request referred to a resource that does not exist.
- Sasl
Authentication Error - SASL Authentication failed.
- Security
Disabled Error - Security features are disabled.
- Serialization
Error - Any exception during serialization in the producer, or deserialization in the consumer.
- Share
Session Limit Reached Error - The limit of share sessions has been reached.
- Share
Session NotFound Error - The share session was not found.
- Snapshot
NotFound Error - Requested snapshot was not found.
- SslAuthentication
Error - The TLS handshake failed.
- Stale
Broker Epoch Error - Broker epoch has changed.
- Stale
Member Epoch Error - The member epoch is stale. The member must retry after receiving its updated member epoch via the ConsumerGroupHeartbeat API.
- Streams
Invalid Topology Epoch Error - The supplied topology epoch is invalid.
- Streams
Invalid Topology Error - The supplied topology is invalid.
- Streams
Topology Fenced Error - The supplied topology epoch is outdated.
- Telemetry
TooLarge Error - Client sent a push telemetry request larger than the maximum size the broker will accept.
- Throttling
Quota Exceeded Error - The request was throttled due to a quota violation.
- Timeout
Error - The request timed out.
- Topic
Authorization Error - Topic authorization failure with the set of unauthorized topics.
- Topic
Deletion Disabled Error - Topic deletion is disabled.
- Topic
Exists Error - Topic with this name already exists.
- Transaction
Abortable Error - The server encountered an error with the transaction. The client can abort the transaction to continue using this transactional ID.
- Transaction
Aborted Error - The transaction was aborted, so the record was not written.
- Transaction
Coordinator Fenced Error - Indicates that the transaction coordinator sending a WriteTxnMarker is no longer the current coordinator for a given producer.
- Transactional
IdAuthorization Error - Transactional Id authorization failed.
- Transactional
IdNot Found Error - The transactionalId could not be found.
- Unacceptable
Credential Error - Requested credential would not meet criteria for acceptability.
- Unknown
Controller IdError - This controller ID is not known.
- Unknown
Leader Epoch Error - The leader epoch in the request is newer than the epoch on the broker.
- Unknown
Member IdError - The coordinator is not aware of this member.
- Unknown
Producer IdError - This exception is raised by the broker if it could not locate the producer metadata associated with the producerId in question. This could happen if, for instance, the producer’s records were deleted because their retention time had elapsed. Once the last records of the producerId are removed, the producer’s metadata is removed from the broker, and future appends by the producer will return this exception.
- Unknown
Server Error - The server experienced an unexpected error when processing the request.
- Unknown
Subscription IdError - Client sent a push telemetry request with an invalid or outdated subscription ID.
- Unknown
Topic IdError - This server does not host this topic ID.
- Unknown
Topic OrPartition Error - This server does not host this topic-partition.
- Unreleased
Instance IdError - The instance ID is still used by another member in the consumer group.
- Unstable
Offset Commit Error - There are unstable offsets that need to be cleared.
- Unsupported
Assignor Error - The assignor or its version range is not supported by the consumer group.
- Unsupported
ByAuthentication Error - Delegation Token requests are not allowed on PLAINTEXT/1-way SSL channels and on delegation token authenticated channels.
- Unsupported
Compression Type Error - The requesting client does not support the compression type of given partition.
- Unsupported
Endpoint Type Error - This endpoint type is not supported yet.
- Unsupported
ForMessage Format Error - The message format version on the broker does not support the request.
- Unsupported
Sasl Mechanism Error - The broker does not support the requested SASL mechanism.
- Unsupported
Version Error - The version of API is not supported.
- Voter
NotFound Error - The voter is not part of the set of voters.
- Wakeup
Error - A blocking operation was preempted by
wakeup().