Bases: ProducerProto[KafkaPublishCommand]
A class to represent Kafka producer.
connect
connect(
producer: AsyncConfluentProducer,
serializer: Optional[SerializerProto],
codec: Optional[CodecProto] = None,
) -> None
Source code in faststream/confluent/publisher/producer.py
| def connect(
self,
producer: "AsyncConfluentProducer",
serializer: Optional["SerializerProto"],
codec: Optional["CodecProto"] = None,
) -> None: ...
|
disconnect async
Source code in faststream/confluent/publisher/producer.py
| async def disconnect(self) -> None: # noqa: PLR6301
return None
|
flush async
Source code in faststream/confluent/publisher/producer.py
| async def flush(self) -> None: # noqa: PLR6301
return None
|
ping abstractmethod async
ping(timeout: float) -> bool
Source code in faststream/confluent/publisher/producer.py
| @abstractmethod
async def ping(self, timeout: float) -> bool:
return False
|
publish abstractmethod async
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
Source code in faststream/confluent/publisher/producer.py
| @override
@abstractmethod
async def publish_batch(self, cmd: "KafkaPublishCommand") -> None: ...
|
request async
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)
|