| AlreadyExistsException | Connect | ✗ | Indicates the operation tried to create an entity that already exists. |
| AuthenticationException | Security | ✗ | This exception indicates that SASL authentication has failed. On authentication failure, clients abort the operation requested and raise one of the subclasses of this exception: SaslAuthenticationException if SASL handshake fails with invalid credentials or any other failure specific to the SASL mechanism used for authentication UnsupportedSaslMechanismException if the SASL mechanism requested by the client is not supported on the broker. IllegalSaslStateException if an unexpected request is received on during SASL handshake. This could be due to misconfigured security protocol. SslAuthenticationException if SSL handshake failed due to any SSLException. |
| AuthorizationException | Security | ✗ | |
| AuthorizerNotReadyException | Security | ✓ | An exception that indicates that the authorizer is not ready to receive the request yet. |
| BrokerNotFoundException | Streams | ✗ | Indicates that none of the specified BOOTSTRAP_SERVERS_CONFIG brokers could be found. |
| BufferExhaustedException | Producer | ✓ | This exception is thrown if the producer cannot allocate memory for a record within max.block.ms due to the buffer being too full. In earlier versions a TimeoutException was thrown instead of this. To keep existing catch-clauses working this class extends TimeoutException. |
| ClusterAuthorizationException | Security | ✗ | |
| CommitFailedException | Consumer | ✗ | This exception is raised when an offset commit with commitSync() fails with an unrecoverable error. This exception is generated on the client side, typically when a group rebalance completes before the commit could be successfully applied. In this case, the commit cannot generally be retried because some of the partitions may have already been assigned to another member in the group. |
| ConcurrentTransactionsException | Transactions | ✓ | |
| ConfigException | Configuration | ✗ | Thrown if the user supplies an invalid configuration |
| ConnectException | Connect | ✗ | ConnectException is the top-level exception type generated by Kafka Connect and connector implementations. |
| CoordinatorLoadInProgressException | Consumer | ✓ | In the context of the group coordinator, the broker returns this error code for any coordinator request if it is still loading the group metadata (e.g. after a leader change for that group metadata topic partition). In the context of the transactional coordinator, this error will be returned if there is a pending transactional request with the same transactional id, or if the transaction cache is currently being populated from the transaction log. |
| CoordinatorNotAvailableException | Consumer | ✓ | In the context of the group coordinator, the broker returns this error code for metadata or offset commit requests if the group metadata topic has not been created yet. In the context of the transactional coordinator, this error will be returned if the underlying transactional log is under replicated or if an append to the log times out. |
| CorruptRecordException | Broker | ✓ | This exception indicates a record has failed its internal CRC check, this generally indicates network or disk corruption. |
| DataException | Connect | ✗ | Base class for all Kafka Connect data API exceptions. |
| DisconnectException | Client | ✓ | Server disconnected before a request could be completed. |
| FencedInstanceIdException | Consumer | ✗ | |
| FencedLeaderEpochException | Broker | ✓ | The request contained a leader epoch which is smaller than that on the broker that received the request. This can happen when an operation is attempted before a pending metadata update has been received. Clients will typically refresh metadata before retrying. |
| FencedMemberEpochException | Consumer | ✗ | |
| GroupAuthorizationException | Security | ✗ | |
| GroupMaxSizeReachedException | Consumer | ✗ | Indicates that a group is already at its configured maximum capacity and cannot accommodate more members |
| IllegalGenerationException | Consumer | ✗ | |
| IllegalSaslStateException | Security | ✗ | This exception indicates unexpected requests prior to SASL authentication. This could be due to misconfigured security, e.g. if PLAINTEXT protocol is used to connect to a SASL endpoint. |
| IllegalWorkerStateException | Connect | ✗ | Indicates that a method has been invoked illegally or at an invalid time by a connector or task. |
| InternalTopicsAlreadySetupException | Streams | ✗ | |
| InterruptException | Client | ✗ | An unchecked wrapper for InterruptedException |
| InvalidConfigurationException | Admin | ✗ | |
| InvalidGroupIdException | Consumer | ✗ | |
| InvalidOffsetException | Consumer | ✗ | Thrown when the offset for a set of partitions is invalid (either undefined or out of range), and no reset policy has been configured. |
| InvalidPartitionsException | Admin | ✗ | |
| InvalidProducerEpochException | Producer | ✗ | This exception indicates that the produce request sent to the partition leader contains a non-matching producer epoch. When encountering this exception, user should abort the ongoing transaction by calling KafkaProducer#abortTransaction which would try to send initPidRequest and reinitialize the producer under the hood. |
| InvalidReplicationFactorException | Admin | ✗ | |
| InvalidStateStoreException | Streams | ✗ | Indicates that there was a problem when trying to access a StateStore StateStore. InvalidStateStoreException is not thrown directly but only its following subclasses. |
| InvalidStateStorePartitionException | Streams | ✗ | Indicates that the specific state store being queried via StoreQueryParameters used a partitioning that is not assigned to this instance. You can use metadataForAllStreamsClients() to discover the correct instance that hosts the requested partition. |
| InvalidTopicException | Admin | ✗ | The client has attempted to perform an operation on an invalid topic. For example the topic name is too long, contains invalid characters etc. This exception is not retriable because the operation won't suddenly become valid. |
| InvalidTxnStateException | Transactions | ✗ | |
| KafkaException | Core | ✗ | The base class of all other Kafka exceptions |
| LeaderNotAvailableException | Broker | ✓ | There is no currently available leader for the given partition (either because a leadership election is in progress or because all replicas are down). |
| LockException | Streams | ✗ | Indicates that the state store directory lock could not be acquired because another thread holds the lock. |
| LogTruncationException | Client | ✗ | In the event of an unclean leader election, the log will be truncated, previously committed data will be lost, and new data will be written over these offsets. When this happens, the consumer will detect the truncation and raise this exception (if no automatic reset policy has been defined) with the first offset known to diverge from what the consumer previously read. |
| MemberIdRequiredException | Consumer | ✗ | |
| MisconfiguredInternalTopicException | Streams | ✗ | |
| MissingInternalTopicsException | Streams | ✗ | |
| MissingSourceTopicException | Streams | ✗ | |
| NetworkException | Broker | ✓ | A misc. network-related IOException occurred when making a request. This could be because the client's metadata is out of date and it is making a request to a node that is now dead. |
| NoOffsetForPartitionException | Consumer | ✗ | Indicates that there is no stored offset for a partition and no defined offset reset policy. |
| NotCoordinatorException | Consumer | ✓ | In the context of the group coordinator, the broker returns this error code if it receives an offset fetch or commit request for a group it's not the coordinator of. In the context of the transactional coordinator, it returns this error when it receives a transactional request with a transactionalId the coordinator doesn't own. |
| NotEnoughReplicasAfterAppendException | Broker | ✓ | Number of insync replicas for the partition is lower than min.insync.replicas This exception is raised when the low ISR size is discovered *after* the message was already appended to the log. Producer retries will cause duplicates. |
| NotEnoughReplicasException | Broker | ✓ | Number of insync replicas for the partition is lower than min.insync.replicas |
| NotFoundException | Connect | ✗ | Indicates that an operation attempted to modify or delete a connector or task that is not present on the worker. |
| NotLeaderOrFollowerException | Broker | ✓ | Broker returns this error if a request could not be processed because the broker is not the leader or follower for a topic partition. This could be a transient exception during leader elections and reassignments. For `Produce` and other requests which are intended only for the leader, this exception indicates that the broker is not the current leader. For consumer `Fetch` requests which may be satisfied by a leader or follower, this exception indicates that the broker is not a replica of the topic partition. |
| OffsetOutOfRangeException | Consumer | ✗ | No reset policy has been defined, and the offsets for these partitions are either larger or smaller than the range of offsets the server has for the given partition. |
| OutOfOrderSequenceException | Producer | ✗ | This exception indicates that the broker received an unexpected sequence number from the producer, which means that data may have been lost. If the producer is configured for idempotence only (i.e. if enable.idempotence is set and no transactional.id is configured), it is possible to continue sending with the same producer instance, but doing so risks reordering of sent records. For transactional producers, this is a fatal error and you should close the producer. |
| PolicyViolationException | Admin | ✗ | Exception thrown if a create topics request does not satisfy the configured policy for a topic. |
| ProcessorStateException | Streams | ✗ | Indicates a processor state operation (e.g. init, put, get) has failed. |
| ProducerFencedException | Transactions | ✗ | This fatal exception indicates that another producer with the same transactional.id has been started. It is only possible to have one producer instance with a transactional.id at any given time, and the latest one to be started "fences" the previous instances so that they can no longer make transactional requests. When you encounter this exception, you must close the producer instance. |
| RebalanceInProgressException | Consumer | ✗ | |
| RecordBatchTooLargeException | Producer | ✗ | This record batch is larger than the maximum allowable size |
| RecordDeserializationException | Serialization | ✗ | This exception is raised for any error that occurs while deserializing records received by the consumer using the configured Deserializer. |
| RecordTooLargeException | Producer | ✗ | This record is larger than the maximum allowable size |
| RetriableCommitFailedException | Consumer | ✓ | Exception thrown when an offset commit fails with a retriable error. This exception is generated on the client side upon receiving retriable error codes from the Group Coordinator in a commit response. Unlike CommitFailedException, this exception indicates that the commit can be retried. The consumer should attempt to commit the offsets again. |
| SaslAuthenticationException | Security | ✗ | This exception indicates that SASL authentication has failed. The error message in the exception indicates the actual cause of failure. SASL authentication failures typically indicate invalid credentials, but could also include other failures specific to the SASL mechanism used for authentication. Note:If evaluateResponse(byte[]) throws this exception during authentication, the message from the exception will be sent to clients in the SaslAuthenticate response. Custom SaslServer implementations may throw this exception in order to provide custom error messages to clients, but should take care not to include any security-critical information in the message that should not be leaked to unauthenticated clients. |
| SchemaBuilderException | Connect | ✗ | Indicates an error while building a schema via SchemaBuilder |
| SchemaProjectorException | Connect | ✗ | Indicates an error while projecting a schema via SchemaProjector |
| SerializationException | Serialization | ✗ | Any exception during serialization in the producer |
| SslAuthenticationException | Security | ✗ | This exception indicates that SSL handshake has failed. See getCause() for the SSLException that caused this failure. SSL handshake failures in clients may indicate client authentication failure due to untrusted certificates if server is configured to request client certificates. Handshake failures could also indicate misconfigured security including protocol/cipher suite mismatch, server certificate authentication failure or server host name verification failure. |
| StaleMemberEpochException | Consumer | ✗ | The StaleMemberEpochException is used in the context of the new consumer group protocol (KIP-848). This error is returned in the OffsetCommit/Fetch APIs when the member epoch received does not match the current member epoch. |
| StateStoreMigratedException | Streams | ✗ | Indicates that the state store being queried is closed although the Kafka Streams state is RUNNING RUNNING or REBALANCING REBALANCING. This could happen because the store moved to some other instance during a rebalance so rediscovery of the state store is required before retrying. |
| StateStoreNotAvailableException | Streams | ✗ | Indicates that the state store being queried is already closed. This could happen when Kafka Streams is in PENDING_SHUTDOWN PENDING_SHUTDOWN or NOT_RUNNING NOT_RUNNING or ERROR ERROR state. |
| StreamsException | Streams | ✗ | StreamsException is the top-level exception type generated by Kafka Streams, and indicates errors have occurred during a StreamThread StreamThread's processing. It is guaranteed that any exception thrown up to the StreamsUncaughtExceptionHandler will be of the type StreamsException. For example, any user exceptions will be wrapped as a StreamsException. |
| StreamsNotStartedException | Streams | ✗ | Indicates that Kafka Streams is in state State CREATED and thus state stores cannot be queries yet. To query state stores, it's required to first start Kafka Streams via start(). You can retry to query the state after the state transitioned to State RUNNING. |
| StreamsRebalancingException | Streams | ✗ | Indicates that Kafka Streams is in state REBALANCING REBALANCING and thus cannot be queried by default. You can retry to query after the rebalance finished. As an alternative, you can also query (potentially stale) state stores during a rebalance via enableStaleStores(). |
| StreamsStoppedException | Streams | ✗ | Indicates that Kafka Streams is in a terminating or terminal state, such as PENDING_SHUTDOWN,PENDING_ERROR,NOT_RUNNING, or ERROR. This Streams instance will need to be discarded and replaced before it can serve queries. The caller may wish to query a different instance. |
| TaskAssignmentException | Streams | ✗ | Indicates a run time error incurred while trying to assign StreamTask stream tasks to StreamThread threads. |
| TaskCorruptedException | Streams | ✗ | Indicates a specific task is corrupted and need to be re-initialized. It can be thrown when: Under EOS, if the checkpoint file does not contain offsets for corresponding store's changelogs, meaning previously it was not close cleanly. Out-of-range exception thrown during restoration, meaning that the changelog has been modified and we re-bootstrap the store. |
| TaskIdFormatException | Streams | ✗ | Indicates a run time error incurred while trying parse the TaskId task id from the read string. |
| TaskMigratedException | Streams | ✗ | Indicates that all tasks belongs to the thread have migrated to another thread. This exception can be thrown when the thread gets fenced (either by the consumer coordinator or by the transaction coordinator), which means it is no longer part of the group but a "zombie" already |
| ThrottlingQuotaExceededException | Admin | ✓ | Exception thrown if an operation on a resource exceeds the throttling quota. |
| TimeoutException | Broker | ✓ | Indicates that a request timed out. |
| TopicAuthorizationException | Security | ✗ | |
| TopicExistsException | Admin | ✗ | |
| TopologyException | Streams | ✗ | Indicates a pre run time error occurred while parsing the Topology logical topology to construct the ProcessorTopology physical processor topology. |
| TransactionAbortedException | Producer | ✗ | This is the Exception thrown when we are aborting any undrained batches during a transaction which is aborted without any underlying cause - which likely means that the user chose to abort. |
| TransactionalIdAuthorizationException | Security | ✗ | |
| UnknownLeaderEpochException | Broker | ✓ | The request contained a leader epoch which is larger than that on the broker that received the request. This can happen if the client observes a metadata update before it has been propagated to all brokers. Clients need not refresh metadata before retrying. |
| UnknownMemberIdException | Consumer | ✗ | |
| UnknownProducerIdException | Producer | ✗ | 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. |
| UnknownStateStoreException | Streams | ✗ | Indicates that the state store being queried is unknown, i.e., the state store does either not exist in your topology or it is not queryable. |
| UnknownTopicIdException | Broker | ✓ | |
| UnknownTopicOrPartitionException | Broker | ✓ | This topic/partition doesn't exist. This exception is used in contexts where a topic doesn't seem to exist based on possibly stale metadata. This exception is retriable because the topic or partition might subsequently be created. |
| UnknownTopologyException | Streams | ✗ | Indicates that the NamedTopology being looked up does not exist in this application |
| UnsupportedForMessageFormatException | Producer | ✗ | The message format version does not support the requested function. For example, if idempotence is requested and the topic is using a message format older than 0.11.0.0, then this error will be returned. |
| UnsupportedSaslMechanismException | Security | ✗ | This exception indicates that the SASL mechanism requested by the client is not enabled on the broker. |
| UnsupportedVersionException | Admin | ✗ | Indicates that a request API or version needed by the client is not supported by the broker. This is typically a fatal error as Kafka clients will downgrade request versions as needed except in cases where a needed feature is not available in old versions. Fatal errors can generally only be handled by closing the client instance, although in some cases it may be possible to continue without relying on the underlying feature. For example, when the producer is used with idempotence enabled, this error is fatal since the producer does not support reverting to weaker semantics. On the other hand, if this error is raised from offsetsForTimes(Map), it would be possible to revert to alternative logic to set the consumer's position. |
| WakeupException | Consumer | ✗ | Exception used to indicate preemption of a blocking operation by an external thread. For example, wakeup can be used to break out of an active Duration), which would raise an instance of this exception. |