faust.transport.producer
¶
Producer.
The Producer is responsible for:
- Holds reference to the transport that created it
- … and the app via
self.transport.app
.- Sending messages.
-
class
faust.transport.producer.
Producer
(transport: faust.types.transports.TransportT, loop: asyncio.events.AbstractEventLoop = None, **kwargs) → None[source]¶ Base Producer.
-
coroutine
create_topic
(self, topic: str, partitions: int, replication: int, *, config: Mapping[str, Any] = None, timeout: Union[datetime.timedelta, float, str] = 1000.0, retention: Union[datetime.timedelta, float, str] = None, compacting: bool = None, deleting: bool = None, ensure_created: bool = False) → None[source]¶ Return type: None
-
logger
= <Logger faust.transport.producer (WARNING)>¶
-
coroutine
send
(self, topic: str, key: Union[bytes, NoneType], value: Union[bytes, NoneType], partition: Union[int, NoneType]) → Awaitable[faust.types.tuples.RecordMetadata][source]¶ Return type: Awaitable
[RecordMetadata
]
-
coroutine
send_and_wait
(self, topic: str, key: Union[bytes, NoneType], value: Union[bytes, NoneType], partition: Union[int, NoneType]) → faust.types.tuples.RecordMetadata[source]¶ Return type: RecordMetadata
-
coroutine