All Classes and Interfaces
Class
Description
A convenient base class for configurations to extend.
Represents an access control entry.
Represents a filter which matches access control entries.
A callback interface that the user can implement to trigger custom actions when an acknowledgement completes.
Represents a binding between a resource pattern and an access control entry.
A filter which can match AclBinding objects.
Delete result for each ACL binding that matched a delete filter.
Represents an operation which an ACL grants or denies permission to perform.
Represents whether an ACL grants or denies permissions.
The administrative client for Kafka, which supports managing and inspecting topics, brokers, configurations and ACLs.
The base class for in-built admin clients.
The AdminClient configuration class, which also contains constants for configuration entry names.
The result of the
Admin.alterClientQuotas(Collection, AlterClientQuotasOptions)
call.A class representing an alter configuration entry containing name, value and operation type.
An interface for enforcing a policy on alter configs requests.
Class containing the create request parameters.
Options for
Admin.incrementalAlterConfigs(Map)
.The result of the
Admin.incrementalAlterConfigs(Map, AlterConfigsOptions)
call.Options for the
Admin.alterConsumerGroupOffsets(String, Map, AlterConsumerGroupOffsetsOptions)
call.The result of the
Admin.alterConsumerGroupOffsets(String, Map)
call.The result of
Admin.alterReplicaLogDirs(Map, AlterReplicaLogDirsOptions)
.The result of the
Admin.alterUserScramCredentials(List)
call.Any API exception that is part of the public protocol and should be a subclass of this class and be part of this
package.
An object representing contextual information from the authentication session.
This exception indicates that SASL authentication has failed.
Request context interface that provides data from request header as well as connection
and authentication information to plugins.
Pluggable authorizer interface for Kafka brokers.
An exception that indicates that the authorizer is not ready to receive the request yet.
Runtime broker configuration metadata provided to authorizers during start up.
A
SampledStat
that maintains a simple average over its samples.This exception is thrown if the producer cannot allocate memory for a record within max.block.ms due to the buffer
being too full.
ByteBufferSerializer
always rewinds
the position of the input buffer to zero for
serialization.A callback interface that the user can implement to allow code to execute when the request is complete.
A detailed description of a single classic group in the cluster.
The classic group state.
Describes a configuration alteration to be made to a client quota entity.
Quota callback interface for brokers and controllers that enables customization of client quota computation.
Describes a client quota entity, which is a mapping of entity types to their names.
The metadata for an entity for which quota is configured.
Interface representing a quota configuration entity.
Entity type of a
ClientQuotaEntity.ConfigEntity
Describes a client quota entity filter.
Describes a component for applying a client quota filter.
Types of quotas that may be configured on brokers for client requests.
A
MetricsReporter
may implement this interface to indicate support for collecting client
telemetry on the server side.A client telemetry payload as sent by the client to the telemetry receiver.
ClientTelemetryReceiver
defines the behaviour for telemetry receiver on the broker side
which receives client telemetry metrics.An immutable representation of a subset of the nodes, topics, and partitions in the Kafka cluster.
The
ClusterResource
class encapsulates metadata for a Kafka cluster.A callback interface that users can implement when they wish to get notified about changes in the Cluster metadata.
This exception is raised when an offset commit with
KafkaConsumer.commitSync()
fails
with an unrecoverable error.A compound stat is a stat where a single measurement and associated data structure feeds many metrics.
A configuration object containing the configuration entries for a resource.
A callback passed to
ConfigProvider
for subscribing to changes.Configuration data from a
ConfigProvider
.This class is used for specifying the set of expected configurations.
The importance level for a configuration
Validation logic for numeric ranges
This is used by the
ConfigDef.validate(Map)
to get valid values for a configuration given the current
configuration values in order to perform full configuration validation and visibility modification.The type for a configuration value
Validation logic the user may provide to perform single configuration validation.
The width of a configuration value
A class representing a configuration entry containing name, value and additional metadata.
Source of configuration entries.
Class representing a configuration synonym of a
ConfigEntry
.Data type of configuration entry.
Thrown if the user supplies an invalid configuration
A provider of configuration data, which may optionally support subscriptions to configuration changes.
A class representing resources that have configs.
Type of resource.
This class wraps a set of
ConfigProvider
instances and uses them to perform
transformations.The result of a transformation from
ConfigTransformer
.A Mix-in style interface for classes that are instantiated by reflection and need to take configuration parameters
The consumer configuration keys
A detailed description of a single consumer group in the cluster.
A listing of a consumer group in the cluster.
A metadata struct containing the consumer group information.
Deprecated.
Since 4.0.
A plugin interface that allows you to intercept (and possibly mutate) records received by the consumer.
This interface is used to define custom partition assignment for use in
KafkaConsumer
.The rebalance protocol defines partition assignment and revocation semantics.
A callback interface that the user can implement to trigger custom actions when the set of partitions assigned to the
consumer changes.
A key/value pair to be received from Kafka.
A container that holds the list
ConsumerRecord
per partition for a
particular topic.A cooperative version of the
AbstractStickyAssignor
.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.
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.
This exception indicates a record has failed its internal CRC check, this generally indicates network or disk
corruption.
Options for
Admin.createAcls(Collection)
.The result of the
Admin.createAcls(Collection)
call.The result of the
KafkaAdminClient.createDelegationToken(CreateDelegationTokenOptions)
call.Options for
Admin.createPartitions(Map)
.The result of the
Admin.createPartitions(Map)
call.An interface for enforcing a policy on create topics requests.
Class containing the create request parameters.
Options for
Admin.createTopics(Collection)
.The result of
Admin.createTopics(Collection)
.A non-sampled version of
WindowedCount
maintained over all time.An non-sampled cumulative total maintained over all time.
A class representing a delegation token.
Options for the
Admin.deleteAcls(Collection)
call.The result of the
Admin.deleteAcls(Collection)
call.A class containing either the deleted ACL binding or an exception if the delete failed.
A class containing the results of the delete ACLs operation.
Options for the
Admin.deleteConsumerGroupOffsets(String, Set)
call.The result of the
Admin.deleteConsumerGroupOffsets(String, Set)
call.Options for the
Admin.deleteConsumerGroups(Collection)
call.The result of the
Admin.deleteConsumerGroups(Collection)
call.Represents information about deleted records
Options for
Admin.deleteRecords(Map, DeleteRecordsOptions)
.The result of the
Admin.deleteRecords(Map)
call.Options for
Admin.deleteTopics(Collection)
.The result of the
Admin.deleteTopics(Collection)
call.Options for
Admin.describeAcls(AclBindingFilter)
.The result of the
Admin.describeAcls(AclBindingFilter)
call.The result of the
Admin.describeClassicGroups(Collection, DescribeClassicGroupsOptions)
} call.The result of the
Admin.describeClientQuotas(ClientQuotaFilter, DescribeClientQuotasOptions)
call.Options for
Admin.describeCluster()
.The result of the
Admin.describeCluster()
call.Options for
Admin.describeConfigs(Collection)
.The result of the
Admin.describeConfigs(Collection)
call.The result of the
KafkaAdminClient.describeConsumerGroups(Collection, DescribeConsumerGroupsOptions)
} call.The result of the
KafkaAdminClient.describeDelegationToken(DescribeDelegationTokenOptions)
call.Options for
Admin.describeFeatures(DescribeFeaturesOptions)
.The result of the
Admin.describeFeatures(DescribeFeaturesOptions)
call.Options for
Admin.describeLogDirs(Collection)
The result of the
Admin.describeLogDirs(Collection)
call.Options for
Admin.describeProducers(Collection)
.Options for
Admin.describeReplicaLogDirs(Collection)
.The result of
Admin.describeReplicaLogDirs(Collection)
.The result of the
KafkaAdminClient.describeShareGroups(Collection, DescribeShareGroupsOptions)
} call.Options for
Admin.describeTopics(Collection)
.The result of the
Admin.describeTopics(Collection)
call.Options for
Admin.describeTransactions(Collection)
.The result of the
Admin.describeUserScramCredentials()
call.An interface for converting bytes to objects.
An implementation of
ConfigProvider
based on a directory of files.Server disconnected before a request could be completed.
Exception thrown due to a request that illegally refers to the same resource twice
(for example, trying to both create and delete the same SCRAM credential for a particular user in a single request).
The result of
Admin.electLeaders(ElectionType, Set, ElectLeadersOptions)
The API of this class is evolving, see Admin
for details.Represents a broker endpoint.
Identifies the endpoint type, as specified by KIP-919.
An implementation of
ConfigProvider
based on environment variables.The result of the
KafkaAdminClient.expireDelegationToken(byte[], ExpireDelegationTokenOptions)
call.Encapsulates details about finalized as well as supported features.
Encapsulates details about an update to a finalized feature.
The request contained a leader epoch which is smaller than that on the broker that received the
request.
Thrown when the share coordinator rejected the request because the share-group state epoch did not match.
The result of the
Admin.fenceProducers(Collection)
call.An implementation of
ConfigProvider
that represents a Properties file.Represents a range of version levels supported by every broker in a cluster for some feature.
ForwardingAdmin
is the default value of forwarding.admin.class
in MirrorMaker.A
CompoundStat
that represents a normalized distribution with a Frequency
metric for each
bucketed value.Definition of a frequency metric used in a
Frequencies
compound statistic.A gauge metric is an instantaneous reading of a particular value.
A listing of a group in the cluster.
Indicates that a consumer group is already at its configured maximum capacity and cannot accommodate more members
The group state.
An algorithm for determining the bin in which a value is to be placed as well as calculating the upper end
of each bin.
A scheme for calculating the bins where the width of each bin is a constant determined by the range of values
and the number of bins.
A scheme for calculating the bins where the width of each bin is one more than the previous bin, and therefore
the bin widths are increasing at a linear rate.
This exception indicates unexpected requests prior to SASL authentication.
Annotation to inform users of how much to rely on a particular package, class or method not changing over time.
Compatibility may be broken at minor release (i.e.
Compatibility is maintained in major, minor and patch releases with one exception: compatibility may be broken
in a major release (i.e.
No guarantee is provided as to reliability or stability across any level of release granularity.
An unchecked wrapper for InterruptedException
An exception that may indicate the client's metadata is out of date
Thrown when the offset for a set of partitions is invalid (either undefined or out of range),
and no reset policy has been configured.
Thrown when the offset for a set of partitions is invalid (either undefined or out of range),
and no reset policy has been configured.
This exception indicates that the produce request sent to the partition leader
contains a non-matching producer epoch.
Thrown when the acknowledgement of delivery of a record could not be completed because the record
state is invalid.
Thrown when a broker registration request is considered invalid by the controller.
Thrown when a regular expression received in a request is not valid.
Thrown when a request breaks basic wire protocol rules.
Thrown when the share session epoch is invalid.
Indicate the timestamp of a record is invalid.
The client has attempted to perform an operation on an invalid topic.
The transaction coordinator returns this error code if the timeout received via the InitProducerIdRequest is larger than
the `transaction.max.timeout.ms` config value.
Register metrics in JMX as dynamic mbeans based on the metric names
The default implementation of
Admin
.A client that consumes records from a Kafka cluster.
The base class of all other Kafka exceptions
A flexible future which supports call chaining and other asynchronous programming patterns.
A function which takes objects of type A and returns objects of type B.
A consumer of two different types of object.
An implementation of MetricsContext, it encapsulates required metrics context properties for Kafka services and clients
Principals in Kafka are defined by a type and a name.
Pluggable principal builder interface which supports both SSL authentication through
SslAuthenticationContext
and SASL through SaslAuthenticationContext
.Serializer/Deserializer interface for
KafkaPrincipal
for the purpose of inter-broker forwarding.A Kafka client that publishes records to the Kafka cluster.
A client that consumes records from a Kafka cluster using a share group.
Miscellaneous disk-related IOException occurred when handling a request.
There is no currently available leader for the given partition (either because a leadership election is in progress
or because all replicas are down).
Options for
Admin.listClientMetricsResources()
.The result of the
Admin.listClientMetricsResources()
call.The result of the
Admin.listConsumerGroupOffsets(Map)
and
Admin.listConsumerGroupOffsets(String)
call.Specification of consumer group offsets to list using
Admin.listConsumerGroupOffsets(java.util.Map)
.Options for
Admin.listConsumerGroups()
.The result of the
Admin.listConsumerGroups()
call.The leader does not have an endpoint corresponding to the listener on which metadata was requested.
Options for
Admin.listGroups()
.The result of the
Admin.listGroups()
call.Options for
Admin.listOffsets(Map)
.The result of the
Admin.listOffsets(Map)
call.Options for
Admin.listTopics()
.The result of the
Admin.listTopics()
call.Options for
Admin.listTransactions()
.The result of the
Admin.listTransactions()
call.A description of a log directory on a particular broker.
Thrown when a request is made for a log directory that is not present on the broker
Login interface for authentication.
This class holds definitions for log level configurations related to Kafka's application logging.
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.
A
SampledStat
that gives the max over its samples.A measurable quantity that can be registered as a metric
A MeasurableStat is a
Stat
that is also Measurable
(i.e.A description of the assignments of a specific group member.
A detailed description of a single group member in the cluster.
A struct containing information about the member to be removed.
This interface allows to define Formatters that can be used to parse and format records read by a
Consumer instance for display.
A compound stat that includes a rate metric and a cumulative total metric.
A metric tracked for monitoring purposes.
Configuration values for metrics
The
MetricName
class encapsulates a metric's name, logical group and its related attributes.A template for a MetricName.
A registry of sensors and metrics.
MetricsContext encapsulates additional contextLabels about metrics exposed via a
MetricsReporter
A plugin interface to allow things to listen as new metrics are created so they can be reported.
Super-interface for
Measurable
or Gauge
that provides
metric values.A
SampledStat
that gives the min over its samples.A mock of the
Consumer
interface you can use for testing code that uses Kafka.A mock of the producer interface you can use for testing code that uses Kafka.
A mock of the
ShareConsumer
interface you can use for testing code that uses Kafka.A misc.
A new partition reassignment, which can be applied via
Admin.alterPartitionReassignments(Map, AlterPartitionReassignmentsOptions)
.Describes new partitions for a particular topic in a call to
Admin.createPartitions(Map)
.A new topic to be created via
Admin.createTopics(Collection)
.Information about a Kafka node
Indicates that there is no stored offset for a partition and no defined offset
reset policy.
Thrown if a reassignment cannot be cancelled because none is in progress.
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.
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.
Number of insync replicas for the partition is lower than min.insync.replicas
Broker returns this error if a request could not be processed because the broker is not the leader
or follower for a topic partition.
A
Callback
for use by the SaslServer
implementation when it
needs to validate the SASL extensions for the OAUTHBEARER mechanism
Callback handlers should use the OAuthBearerExtensionsValidatorCallback.valid(String)
method to communicate valid extensions back to the SASL server.OAuthBearerLoginCallbackHandler
is an AuthenticateCallbackHandler
that
accepts OAuthBearerTokenCallback
and SaslExtensionsCallback
callbacks to
perform the steps to request a JWT from an OAuth/OIDC provider using the
clientcredentials
.The
LoginModule
for the SASL/OAUTHBEARER mechanism.The
b64token
value as defined in
RFC 6750 Section
2.1 along with the token's specific scope and lifetime and principal
name.A
Callback
for use by the SaslClient
and Login
implementations when they require an OAuth 2 bearer token.A
Callback
for use by the SaslServer
implementation when it
needs to provide an OAuth 2 bearer token compact serialization for
validation.OAuthBearerValidatorCallbackHandler
is an AuthenticateCallbackHandler
that
accepts OAuthBearerValidatorCallback
and OAuthBearerExtensionsValidatorCallback
callbacks to implement OAuth/OIDC validation.The Kafka offset commit API allows users to provide additional metadata (in the form of a string)
when an offset is committed.
A container class for offset and timestamp.
A callback interface that the user can implement to trigger custom actions when a commit request completes.
The client has tried to save its offset with associated metadata larger than the maximum size allowed by the server.
Indicates that the leader is not able to guarantee monotonically increasing offsets
due to the high watermark lagging behind the epoch start offset after a recent leader election
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.
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.
Deprecated.
Since 4.0.
This class allows to specify the desired offsets when using
KafkaAdminClient.listOffsets(Map, ListOffsetsOptions)
Indicates that the broker did not attempt to execute this operation.
This exception indicates that the broker received an unexpected sequence number from the producer,
which means that data may have been lost.
Partitioner Interface
This is used to describe per-partition state in the MetadataResponse.
A partition reassignment, which has been listed via
Admin.listPartitionReassignments()
.Resource pattern type.
A compound stat that reports one or more percentiles
Exception thrown if a create topics request does not satisfy the configured policy for a topic.
Exception used to indicate a kafka principal deserialization failure during request forwarding.
The interface for the
KafkaProducer
Configuration for the Kafka Producer.
This fatal exception indicates that another producer with the same
transactional.id
has been
started.A plugin interface that allows you to intercept (and possibly mutate) the records received by the producer before
they are published to the Kafka cluster.
A key/value pair to be sent to Kafka.
This class is used to describe the state of the quorum received in DescribeQuorumResponse.
An upper or lower bound for metrics
Thrown when a sensor records a value that causes a metric to go outside the bounds configured as its quota
An endpoint for a raft quorum voter.
The range assignor works on a per-topic basis.
The rate of the given quantity.
Thrown if a request cannot be completed because a partition reassignment is in progress.
Interface for reconfigurable classes that support dynamic configuration.
This record batch is larger than the maximum allowable size
This exception is raised for any error that occurs while deserializing records received by the consumer using
the configured
Deserializer
.The metadata for a record that has been acknowledged by the server
Describe records to delete in a call to
Admin.deleteRecords(Map)
This record is larger than the maximum allowable size
The result of the
Admin.removeMembersFromConsumerGroup(String, RemoveMembersFromConsumerGroupOptions)
call.The result of the
KafkaAdminClient.expireDelegationToken(byte[], ExpireDelegationTokenOptions)
call.A description of a replica on a particular broker.
The replica is not available for the requested topic partition.
Represents a cluster resource with a tuple of (type, name).
Exception thrown due to a request for a resource that does not exist.
Represents a pattern that is used by ACLs to match zero or more
Resources
.Represents a filter that can match
ResourcePattern
.Represents a type of resource which an ACL can be applied to.
A retriable exception is a transient exception that if retried may succeed.
The round robin assignor lays out all the available partitions and all the available consumers.
The "Round-Robin" partitioner
This partitioning strategy can be used when user wants
to distribute the writes to all partitions equally.
A SampledStat records a single scalar value measured over one or more samples.
This exception indicates that SASL authentication has failed.
A simple immutable value object class holding customizable SASL extensions.
Optional callback used for SASL mechanisms if any extensions need to be set
in the SASL exchange.
SCRAM credential class that encapsulates the credential data persisted for each user that is
accessible to the server.
Callback used for SCRAM mechanisms.
Mechanism and iterations for a SASL/SCRAM credential associated with a user.
Optional callback used for SCRAM mechanisms if any extensions need to be set
in the SASL/SCRAM exchange.
Representation of a SASL/SCRAM Mechanism.
Contains the common security config for SSL and SASL
An error indicating that security is disabled on the broker.
An interface for generating security providers.
A sensor applies a continuous sequence of numerical values to a set of associated metrics.
The interface for wrapping a serializer and deserializer for the given data type.
Factory for creating serializers / deserializers.
Any exception during serialization in the producer
An interface for converting objects to bytes.
A detailed description of a single share group in the cluster.
A description of the assignments of a specific share group member.
A detailed description of a single share group member in the cluster.
Thrown when the share session was not found.
A simple rate the rate is incrementally calculated
based on the elapsed time between the earliest reading
and now.
This exception indicates that SSL handshake has failed.
Describes whether the server should require or request client authentication.
Plugin interface for allowing creation of
SSLEngine
object in a custom way.The StaleMemberEpochException is used in the context of the new
consumer group protocol (KIP-848).
A Stat is a quantity such as average, max, etc that is computed off the stream of updates to a sensor
The sticky assignor serves two purposes.
String encoding defaults to UTF8 and can be customized by setting the property key.deserializer.encoding,
value.deserializer.encoding or deserializer.encoding.
String encoding defaults to UTF8 and can be customized by setting the property key.serializer.encoding,
value.serializer.encoding or serializer.encoding.
Represents a regular expression compatible with Google RE2/J, used to subscribe to topics.
Represents a range of versions that a particular broker supports for some feature.
This exception indicates that the size of the telemetry metrics data is too large.
Exception thrown if an operation on a resource exceeds the throttling quota.
Indicates that a request timed out.
The
TokenBucket
is a MeasurableStat
implementing a token bucket algorithm
that is usable within a Sensor
.A class representing a delegation token details.
A class used to represent a collection of topics.
A class used to represent a collection of topics defined by their topic ID.
A class used to represent a collection of topics defined by their topic name.
Keys that can be used to configure a topic.
A detailed description of a single topic in the cluster.
This represents universally unique identifier with topic id for a topic partition.
A listing of a topic in the cluster.
A topic name and partition number
A class containing leadership, replicas and ISR information for a topic partition.
The topic name, partition number and the brokerId of the replica
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.
Exception thrown when attempting to define a credential that does not meet the criteria for acceptability
(for example, attempting to create a SCRAM credential with an empty username or password or too few/many iterations).
The request contained a leader epoch which is larger than that on the broker that received the
request.
This exception is raised by the broker if it could not locate the producer metadata associated with the producerId
in question.
An error occurred on the server for which the client doesn't have a corresponding error code.
This exception indicates that the client sent an invalid or outdated SubscriptionId
This topic/partition doesn't exist.
Options for
Admin.unregisterBroker(int, UnregisterBrokerOptions)
.The result of the
Admin.unregisterBroker(int, UnregisterBrokerOptions)
call.Exception thrown when there are unstable offsets for the requested topic partitions.
Authentication mechanism does not support the requested function.
The requesting client does not support the compression type of given partition.
The message format version does not support the requested function.
This exception indicates that the SASL mechanism requested by the client
is not enabled on the broker.
Indicates that a request API or version needed by the client is not supported by the broker.
Options for
Admin.updateFeatures(Map, UpdateFeaturesOptions)
.The result of the
Admin.updateFeatures(Map, UpdateFeaturesOptions)
call.A request to alter a user's SASL/SCRAM credentials.
A request to delete a SASL/SCRAM credential for a user.
Representation of all SASL/SCRAM credentials associated with a user that can be retrieved, or an exception indicating
why credentials could not be retrieved.
A request to update/insert a SASL/SCRAM credential for a user.
This class defines an immutable universally unique identifier (UUID).
We are converting the byte array to String before deserializing to UUID.
We are converting UUID to String before serializing.
An instantaneous value.
Exception used to indicate preemption of a blocking operation by an external thread.
A
SampledStat
that maintains a simple count of what it has seen.A
SampledStat
that maintains the sum of what it has seen.