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
commit_transactions
(self, tid_to_offset_map: Mapping[str, Mapping[faust.types.tuples.TP, int]], group_id: str, start_new_transaction: bool = True) → None[source]¶ - Return type
None
-
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: Optional[bytes], value: Optional[bytes], partition: Optional[int], timestamp: Optional[float], headers: Union[List[Tuple[str, bytes]], Mapping[str, bytes], None], *, transactional_id: str = None) → Awaitable[faust.types.tuples.RecordMetadata][source]¶ - Return type
-
coroutine