faust.types.topics

class faust.types.topics.TopicT(app: _AppT, *, topics: Optional[Sequence[str]] = None, pattern: Optional[Union[str, Pattern]] = None, schema: Optional[_SchemaT] = None, key_type: Optional[_ModelArg] = None, value_type: Optional[_ModelArg] = None, is_iterator: bool = False, partitions: Optional[int] = None, retention: Optional[Union[timedelta, float, str]] = None, compacting: Optional[bool] = None, deleting: Optional[bool] = None, replicas: Optional[int] = None, acks: bool = True, internal: bool = False, config: Optional[Mapping[str, Any]] = None, queue: Optional[ThrowableQueue] = None, key_serializer: Optional[Union[CodecT, str]] = None, value_serializer: Optional[Union[CodecT, str]] = None, maxsize: Optional[int] = None, root: Optional[ChannelT] = None, active_partitions: Optional[Set[TP]] = None, allow_empty: bool = False, has_prefix: bool = False, loop: Optional[AbstractEventLoop] = None)[source]
topics: Sequence[str]

Iterable/Sequence of topic names to subscribe to.

retention: Optional[Union[timedelta, float, str]]

expiry time in seconds for messages in the topic.

Type:

Topic retention setting

compacting: Optional[bool]

Flag that when enabled means the topic can be “compacted”: if the topic is a log of key/value pairs, the broker can delete old values for the same key.

deleting: Optional[bool]
replicas: Optional[int]

Number of replicas for topic.

config: Optional[Mapping[str, Any]]

Additional configuration as a mapping.

acks: bool

Enable acks for this topic.

internal: bool

it’s owned by us and we are allowed to create or delete the topic as necessary.

Type:

Mark topic as internal

has_prefix: bool = False
active_partitions: Optional[Set[TP]]
abstract property pattern: Optional[Pattern]
Return type:

_UnionGenericAlias[_SpecialGenericAlias, None]

app: _AppT
schema: _SchemaT
key_type: Optional[_ModelArg]
value_type: Optional[_ModelArg]
loop: Optional[AbstractEventLoop]
maxsize: Optional[int]
abstract property partitions: Optional[int]
Return type:

_UnionGenericAlias[int, None]

abstract derive(**kwargs: Any) ChannelT[source]
Return type:

ChannelT

abstract derive_topic(*, topics: Optional[Sequence[str]] = None, schema: Optional[_SchemaT] = None, key_type: Optional[_ModelArg] = None, value_type: Optional[_ModelArg] = None, partitions: Optional[int] = None, retention: Optional[Union[timedelta, float, str]] = None, compacting: Optional[bool] = None, deleting: Optional[bool] = None, internal: bool = False, config: Optional[Mapping[str, Any]] = None, prefix: str = '', suffix: str = '', **kwargs: Any) TopicT[source]
Return type:

TopicT