from collections.abc import Callable

class Producer:
    def __init__(self, conf: dict[str, str]) -> None: ...
    def produce(
        self, topic: str, value: bytes, callback: Callable[[Exception, Message], None]
    ) -> None: ...
    def flush(self) -> None: ...

class Message:
    def topic(self) -> str: ...
    def partition(self) -> int: ...
