Skip to main content

Module common

Module common 

Source
Expand description

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

Re-exports§

pub use kafka_future::KafkaFuture;
pub use topic_collection::TopicCollection;

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).
kafka_future
A flexible future for asynchronous Kafka operations.
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).
topic_collection
A collection of topics defined by name or ID.

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
The base class of all other Kafka errors
LocalCallbackError
An error raised by a callback written in another language.
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.
LocalUnsupportedOperationError
Unsupported operation error — the requested operation is not supported.
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
This represents universally unique identifier with topic id for a topic partition. This makes sure that topics recreated with the same name will always have unique topic identifiers.
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. More specifically, the random UUIDs generated by this class are variant 2 (Leach-Salz) version 4 UUIDs. This is the same type of UUID as the ones generated by java.util.UUID. The Display implementation prints using the base64 string encoding. Likewise, the from_string method expects a base64 string encoding.

Enums§

ClassicGroupState
The classic group state.
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 group state.
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.

Traits§

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