Skip to main content

Module common

Module common 

Source
Expand description

Common types and utilities for Kafka (org.apache.kafka.common)

Modules§

acl
Access control list (ACL) types.
config
Configuration types for Kafka clients (org.apache.kafka.common.config).
errors
Kafka’s exception classes (org.apache.kafka.common.errors). Kafka’s exception classes.
header
Kafka record headers (org.apache.kafka.common.header).
metrics
The Kafka metrics framework (org.apache.kafka.common.metrics).
quota
Client quota types.
record
Provides utility components related to Kafka records (org.apache.kafka.common.record).
resource
ACL resource types.
security
Security types and utilities (org.apache.kafka.common.security).
serialization
Serialization interfaces and implementations (org.apache.kafka.common.serialization).

Structs§

Cluster
An immutable representation of a subset of the nodes, topics, and partitions in the Kafka cluster.
ClusterResource
The ClusterResource class encapsulates metadata for a Kafka cluster.
InvalidRecordError
This record has failed the validation on broker and hence will be rejected.
KafkaError
Base Kafka error with common fields shared by all error types.
KafkaFuture
A flexible future which supports async result retrieval.
LocalConcurrentModificationError
Concurrent modification error — the consumer was accessed from more than one task.
LocalIllegalArgumentError
Illegal argument error — an invalid argument was provided to a method.
LocalIllegalStateError
Illegal state error — a method was called in an invalid state.
LocalTimeoutError
A wait on a future timed out.
MetricName
The MetricName class encapsulates a metric’s name, logical group and its related attributes. It should be constructed using Metrics::metric_name(...).
MetricNameTemplate
A template for a MetricName. It contains a name, group, and description, as well as all the tags that will be used to create the metric name. Tag values are omitted from the template, but are filled in at runtime with their specified values. The order of the tags is maintained so that the metric names can be compared and sorted lexicographically.
Node
Information about a Kafka node.
PartitionInfo
This is used to describe per-partition state in the MetadataResponse.
TopicIdPartition
A universally unique identifier paired with a TopicPartition.
TopicPartition
A topic name and partition number.
TopicPartitionInfo
A class containing leadership, replicas and ISR information for a topic partition.
TopicPartitionReplica
The topic name, partition number and the brokerId of the replica.
Uuid
This class defines an immutable universally unique identifier (UUID). It represents a 128-bit value.

Enums§

ClassicGroupState
The state of a classic group.
ElectionType
Options for Admin::elect_leaders.
Error
Unified error type for polymorphic error handling — this crate’s top-level error, returned by every fallible API.
GroupState
The state of a group.
GroupType
The type of a group.
IsolationLevel
Isolation level used to control which records are visible to a consumer when reading from a topic.
MetricValue
The type-erased value of a metric.
TopicCollection
A collection of topics. This collection may define topics by name or ID.

Traits§

ClusterResourceListener
A callback trait that users can implement to get notified about changes in the cluster metadata.
Metric
A metric tracked for monitoring purposes.