Skip to content

AsyncConfluentFastProducer

faststream.confluent.publisher.producer.AsyncConfluentFastProducer #

Bases: ProducerProto[KafkaPublishCommand]

A class to represent Kafka producer.

connect #

connect(producer, serializer)
Source code in faststream/confluent/publisher/producer.py
def connect(
    self,
    producer: "AsyncConfluentProducer",
    serializer: Optional["SerializerProto"],
) -> None: ...

disconnect async #

disconnect()
Source code in faststream/confluent/publisher/producer.py
async def disconnect(self) -> None:
    return None

flush async #

flush()
Source code in faststream/confluent/publisher/producer.py
async def flush(self) -> None:
    return None

ping abstractmethod async #

ping(timeout)
Source code in faststream/confluent/publisher/producer.py
@abstractmethod
async def ping(self, timeout: float) -> bool:
    return False

publish abstractmethod async #

publish(cmd)
Source code in faststream/confluent/publisher/producer.py
@override
@abstractmethod
async def publish(
    self,
    cmd: "KafkaPublishCommand",
) -> "asyncio.Future[Message | None] | Message | None": ...

publish_batch abstractmethod async #

publish_batch(cmd)
Source code in faststream/confluent/publisher/producer.py
@override
@abstractmethod
async def publish_batch(self, cmd: "KafkaPublishCommand") -> None: ...

request async #

request(cmd)
Source code in faststream/confluent/publisher/producer.py
@override
async def request(self, cmd: "KafkaPublishCommand") -> Any:
    msg = "Kafka doesn't support `request` method without test client."
    raise FeatureNotSupportedException(msg)