faust.tables.manager

Tables (changelog stream).

class faust.tables.manager.TableManager(app: faust.types.app.AppT, **kwargs: Any) → None[source]

Manage tables used by Faust worker.

persist_offset_on_commit(store: faust.types.stores.StoreT, tp: faust.types.tuples.TP, offset: int) → None[source]

Mark the persisted offset for a TP to be saved on commit.

This is used for “exactly_once” processing guarantee. Instead of writing the persisted offset to RocksDB when the message is sent, we write it to disk when the offset is committed.

Return type

None

on_commit(offsets: MutableMapping[faust.types.tuples.TP, int]) → None[source]

Call when committing source topic partitions.

Return type

None

on_commit_tp(tp: faust.types.tuples.TP) → None[source]

Call when committing source topic partition used by this table.

Return type

None

on_rebalance_start() → None[source]

Call when a new rebalancing operation starts.

Return type

None

on_actives_ready() → None[source]

Call when actives are fully up-to-date.

Return type

None

on_standbys_ready() → None[source]

Call when standbys are fully up-to-date and ready for failover.

Return type

None

property changelog_topics

Return the set of known changelog topics. :rtype: Set[str]

property changelog_queue

Queue used to buffer changelog events. :rtype: ThrowableQueue

property recovery

Recovery service used by this table manager. :rtype: Recovery[]

add(table: faust.types.tables.CollectionT) → faust.types.tables.CollectionT[source]

Add table to be managed by this table manager.

Return type

CollectionT[]

logger = <Logger faust.tables.manager (WARNING)>
async on_start() → None[source]

Call when table manager is starting.

Return type

None

async on_stop() → None[source]

Call when table manager is stopping.

Return type

None

on_partitions_revoked(revoked: Set[faust.types.tuples.TP]) → None[source]

Call when cluster is rebalancing and partitions revoked.

Return type

None

async on_rebalance(assigned: Set[faust.types.tuples.TP], revoked: Set[faust.types.tuples.TP], newly_assigned: Set[faust.types.tuples.TP]) → None[source]

Call when the cluster is rebalancing.

Return type

None