import threading
from _typeshed import Incomplete
from typing import NamedTuple

log: Incomplete

class PartitionResponse(NamedTuple):
    error: Incomplete = ...
    base_offset: Incomplete = ...
    last_offset: Incomplete = ...
    log_append_time: Incomplete = ...
    log_start_offset: Incomplete = ...
    record_errors: Incomplete = ...
    error_message: Incomplete = ...
    current_leader: Incomplete = ...

class Sender(threading.Thread):
    DEFAULT_CONFIG: Incomplete
    config: Incomplete
    name: Incomplete
    def __init__(self, client, metadata, accumulator, **configs) -> None: ...
    def run(self) -> None: ...
    def run_once(self) -> None: ...
    def initiate_close(self) -> None: ...
    def force_close(self) -> None: ...
    def add_topic(self, topic) -> None: ...
    def wakeup(self) -> None: ...
    def bootstrap_connected(self): ...

class SenderMetrics:
    metrics: Incomplete
    batch_size_sensor: Incomplete
    compression_rate_sensor: Incomplete
    queue_time_sensor: Incomplete
    records_per_request_sensor: Incomplete
    byte_rate_sensor: Incomplete
    retry_sensor: Incomplete
    error_sensor: Incomplete
    max_record_size_sensor: Incomplete
    def __init__(self, metrics, client, metadata) -> None: ...
    def add_metric(
        self, metric_name, measurable, group_name: str = "producer-metrics", description=None, tags=None, sensor_name=None
    ) -> None: ...
    def maybe_register_topic_metrics(self, topic): ...
    def update_produce_request_metrics(self, batches_map) -> None: ...
    def record_retries(self, topic, count) -> None: ...
    def record_errors(self, topic, count) -> None: ...
