Skip to content

FakeConfluentFastProducer

faststream.confluent.publisher.producer.FakeConfluentFastProducer #

Bases: AsyncConfluentFastProducer

codec instance-attribute #

codec: CodecProto

connect #

connect(
    producer: AsyncConfluentProducer,
    serializer: Optional[SerializerProto],
    codec: Optional[CodecProto] = None,
) -> None
Source code in faststream/confluent/publisher/producer.py
71
72
73
74
75
76
77
def connect(
    self,
    producer: "AsyncConfluentProducer",
    serializer: Optional["SerializerProto"],
    codec: Optional["CodecProto"] = None,
) -> None:
    raise NotImplementedError

disconnect async #

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

flush async #

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

ping async #

ping(timeout: float) -> bool
Source code in faststream/confluent/publisher/producer.py
85
86
async def ping(self, timeout: float) -> bool:
    raise NotImplementedError

publish async #

publish(
    cmd: KafkaPublishCommand,
) -> Future[Message | None] | Message | None
Source code in faststream/confluent/publisher/producer.py
88
89
90
91
92
93
@override
async def publish(
    self,
    cmd: "KafkaPublishCommand",
) -> "asyncio.Future[Message | None] | Message | None":
    raise NotImplementedError

publish_batch async #

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

request async #

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