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 abort_transaction(self, transactional_id: str) → None[source]
Return type:None
coroutine begin_transaction(self, transactional_id: str) → None[source]
Return type:None
coroutine commit_transaction(self, transactional_id: str) → None[source]
Return type:None
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
coroutine flush(self) → None[source]
Return type:None
key_partition(topic: str, key: bytes) → faust.types.tuples.TP[source]
Return type:TP
logger = <Logger faust.transport.producer (WARNING)>
coroutine maybe_begin_transaction(self, transactional_id: str) → None[source]
Return type:None
coroutine send(self, topic: str, key: Optional[bytes], value: Optional[bytes], partition: Optional[int], timestamp: Optional[float], *, transactional_id: str = None) → Awaitable[faust.types.tuples.RecordMetadata][source]
Return type:Awaitable[RecordMetadata]
coroutine send_and_wait(self, topic: str, key: Optional[bytes], value: Optional[bytes], partition: Optional[int], timestamp: Optional[float], *, transactional_id: str = None) → faust.types.tuples.RecordMetadata[source]
Return type:RecordMetadata
coroutine stop_transaction(self, transactional_id: str) → None[source]
Return type:None