Skip to main content

Module errors

Module errors 

Source
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.
AuthenticationError
Authentication failed.
AuthorizationError
The client is not authorized to perform the operation.
AuthorizerNotReadyError
The authorizer is not ready to serve the request yet; retrying may succeed.
BrokerIdNotRegisteredError
The given broker ID was not registered.
BrokerNotAvailableError
The broker is not available.
ClusterAuthorizationError
Cluster authorization failed.
ConcurrentTransactionsError
The producer attempted to update a transaction while another concurrent operation on the same transaction was ongoing.
ControllerMovedError
The controller moved to another broker.
CoordinatorLoadInProgressError
The coordinator is loading and hence can’t process requests.
CoordinatorNotAvailableError
The coordinator is not available.
CorruptRecordError
This message has failed its CRC checksum, exceeds the valid size, has a null key for a compacted topic, or is otherwise corrupt.
DelegationTokenAuthorizationError
Delegation Token authorization failed.
DelegationTokenDisabledError
Delegation Token feature is not enabled.
DelegationTokenExpiredError
Delegation Token is expired.
DelegationTokenNotFoundError
Delegation Token is not found on server.
DelegationTokenOwnerMismatchError
Specified Principal is not valid Owner/Renewer.
DisconnectError
The connection to the broker was lost before a response arrived.
DuplicateBrokerRegistrationError
This broker ID is already in use.
DuplicateResourceError
A request illegally referred to the same resource twice.
DuplicateSequenceError
The broker received a duplicate sequence number.
DuplicateVoterError
The voter is already part of the set of voters.
ElectionNotNeededError
Leader election not needed for topic partition.
EligibleLeadersNotAvailableError
Eligible topic partition leaders are not available.
FeatureUpdateFailedError
Unable to update finalized features due to an unexpected server error.
FencedInstanceIdError
The broker rejected this static consumer since another consumer with the same group.instance.id has registered with a different member.id.
FencedLeaderEpochError
The leader epoch in the request is older than the epoch on the broker.
FencedMemberEpochError
The member epoch is fenced by the group coordinator. The member must abandon all its partitions and rejoin.
FencedStateEpochError
The share coordinator rejected the request because the share-group state epoch did not match.
FetchSessionIdNotFoundError
The fetch session ID was not found.
FetchSessionTopicIdError
The fetch session encountered inconsistent topic ID usage.
GroupAuthorizationError
Group authorization failure with the group ID.
GroupIdNotFoundError
The group id does not exist.
GroupMaxSizeReachedError
The group has reached its maximum size.
GroupNotEmptyError
The group is not empty.
GroupSubscribedToTopicError
Deleting offsets of a topic is forbidden while the consumer group is actively subscribed to it.
IllegalGenerationError
Specified group generation id is not valid.
IllegalSaslStateError
Request is not valid given the current SASL state.
InconsistentClusterIdError
The clusterId in the request does not match that found on the server.
InconsistentGroupProtocolError
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.
InconsistentTopicIdError
The log’s topic ID did not match the topic ID in the request.
InconsistentVoterSetError
Indicates that the either the sender or recipient of a voter-only request is not one of the expected voters.
IneligibleReplicaError
The new ISR contains at least one ineligible replica.
InterruptError
A blocking operation was interrupted.
InvalidCommitOffsetSizeError
The committing offset data size is not valid.
InvalidConfigurationError
Configuration is invalid.
InvalidFetchSessionEpochError
The fetch session epoch is invalid.
InvalidFetchSizeError
The requested fetch size is invalid.
InvalidGroupIdError
The group id is invalid.
InvalidOffsetError
No valid offset is available for the requested partition.
InvalidPartitionsError
Number of partitions is below 1.
InvalidPidMappingError
The producer attempted to use a producer id which is not currently assigned to its transactional id.
InvalidPrincipalTypeError
Supplied principalType is not supported.
InvalidProducerEpochError
Producer attempted to produce with an old epoch.
InvalidRecordStateError
The record state is invalid.
InvalidRegistrationError
The controller has considered the broker registration to be invalid.
InvalidRegularExpression
The regular expression is not valid.
InvalidReplicaAssignmentError
Replica assignment is invalid.
InvalidReplicationFactorError
Replication factor is below 1 or larger than the number of available brokers.
InvalidRequestError
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.
InvalidRequiredAcksError
Produce request specified an invalid value for required acks.
InvalidSessionTimeoutError
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).
InvalidShareSessionEpochError
The share session epoch is invalid.
InvalidTimestampError
The timestamp of the message is out of acceptable range.
InvalidTopicError
Invalid topic error with the set of invalid topics.
InvalidTxnStateError
The producer attempted a transactional operation in an invalid state.
InvalidTxnTimeoutError
The transaction timeout is larger than the maximum value allowed by the broker (as configured by transaction.max.timeout.ms).
InvalidUpdateVersionError
The given update version was invalid.
InvalidVoterKeyError
The voter key doesn’t match the receiving replica’s key.
KafkaStorageError
Disk error when trying to access log file on the disk.
LeaderNotAvailableError
There is no leader for this topic-partition as we are in the middle of a leadership election.
ListenerNotFoundError
There is no listener on the leader broker that matches the listener on which metadata request was processed.
LogDirNotFoundError
The user-specified log directory is not found in the broker config.
MemberIdRequiredError
The group member needs to have a valid member id before actually entering a consumer group.
MismatchedEndpointTypeError
The request was sent to an endpoint of the wrong type.
NetworkError
The server disconnected before a response was received.
NewLeaderElectedError
The AlterPartition request successfully updated the partition state but the leader has changed.
NoReassignmentInProgressError
No partition reassignment is in progress.
NotControllerError
This is not the correct controller for this cluster.
NotCoordinatorError
This is not the correct coordinator.
NotEnoughReplicasAfterAppendError
Messages are written to the log, but to fewer in-sync replicas than required.
NotEnoughReplicasError
Messages are rejected since there are fewer in-sync replicas than required.
NotLeaderOrFollowerError
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.
OffsetMetadataTooLarge
The metadata field of the offset request was too large.
OffsetMovedToTieredStorageError
The requested offset is moved to tiered storage.
OffsetNotAvailableError
The leader high watermark has not caught up from a recent leader election so the offsets cannot be guaranteed to be monotonically increasing.
OffsetOutOfRangeError
The requested offset is not within the range of offsets maintained by the server.
OperationNotAttemptedError
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.
OutOfOrderSequenceError
The broker received an out of order sequence number.
PolicyViolationError
Request parameters do not satisfy the configured policy.
PositionOutOfRangeError
Requested position is not greater than or equal to zero, and less than the size of the snapshot.
PreferredLeaderNotAvailableError
The preferred leader was not available.
PrincipalDeserializationError
Request principal deserialization failed during forwarding.
ProducerFencedError
There is a newer producer with the same transactionalId which fences the current one.
ReassignmentInProgressError
A partition reassignment is in progress.
RebalanceInProgressError
The group is rebalancing, so a rejoin is needed.
RebootstrapRequiredError
Client metadata is stale. The client should rebootstrap to obtain new metadata.
RecordBatchTooLargeError
The request included message batch larger than the configured segment size on the server.
RecordTooLargeError
The request included a message larger than the max message size the server will accept.
ReplicaNotAvailableError
The replica is not available for the requested topic-partition.
ResourceNotFoundError
A request referred to a resource that does not exist.
SaslAuthenticationError
SASL Authentication failed.
SecurityDisabledError
Security features are disabled.
SerializationError
Any exception during serialization in the producer, or deserialization in the consumer.
ShareSessionLimitReachedError
The limit of share sessions has been reached.
ShareSessionNotFoundError
The share session was not found.
SnapshotNotFoundError
Requested snapshot was not found.
SslAuthenticationError
The TLS handshake failed.
StaleBrokerEpochError
Broker epoch has changed.
StaleMemberEpochError
The member epoch is stale. The member must retry after receiving its updated member epoch via the ConsumerGroupHeartbeat API.
StreamsInvalidTopologyEpochError
The supplied topology epoch is invalid.
StreamsInvalidTopologyError
The supplied topology is invalid.
StreamsTopologyFencedError
The supplied topology epoch is outdated.
TelemetryTooLargeError
Client sent a push telemetry request larger than the maximum size the broker will accept.
ThrottlingQuotaExceededError
The request was throttled due to a quota violation.
TimeoutError
The request timed out.
TopicAuthorizationError
Topic authorization failure with the set of unauthorized topics.
TopicDeletionDisabledError
Topic deletion is disabled.
TopicExistsError
Topic with this name already exists.
TransactionAbortableError
The server encountered an error with the transaction. The client can abort the transaction to continue using this transactional ID.
TransactionAbortedError
The transaction was aborted, so the record was not written.
TransactionCoordinatorFencedError
Indicates that the transaction coordinator sending a WriteTxnMarker is no longer the current coordinator for a given producer.
TransactionalIdAuthorizationError
Transactional Id authorization failed.
TransactionalIdNotFoundError
The transactionalId could not be found.
UnacceptableCredentialError
Requested credential would not meet criteria for acceptability.
UnknownControllerIdError
This controller ID is not known.
UnknownLeaderEpochError
The leader epoch in the request is newer than the epoch on the broker.
UnknownMemberIdError
The coordinator is not aware of this member.
UnknownProducerIdError
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.
UnknownServerError
The server experienced an unexpected error when processing the request.
UnknownSubscriptionIdError
Client sent a push telemetry request with an invalid or outdated subscription ID.
UnknownTopicIdError
This server does not host this topic ID.
UnknownTopicOrPartitionError
This server does not host this topic-partition.
UnreleasedInstanceIdError
The instance ID is still used by another member in the consumer group.
UnstableOffsetCommitError
There are unstable offsets that need to be cleared.
UnsupportedAssignorError
The assignor or its version range is not supported by the consumer group.
UnsupportedByAuthenticationError
Delegation Token requests are not allowed on PLAINTEXT/1-way SSL channels and on delegation token authenticated channels.
UnsupportedCompressionTypeError
The requesting client does not support the compression type of given partition.
UnsupportedEndpointTypeError
This endpoint type is not supported yet.
UnsupportedForMessageFormatError
The message format version on the broker does not support the request.
UnsupportedSaslMechanismError
The broker does not support the requested SASL mechanism.
UnsupportedVersionError
The version of API is not supported.
VoterNotFoundError
The voter is not part of the set of voters.
WakeupError
A blocking operation was preempted by wakeup().