Topic(mapping=None, *, ignore_unknown_fields=False, **kwargs)
A Kafka topic in a given cluster.
Attributes |
|
---|---|
Name | Description |
name |
str
Identifier. The name of the topic. The topic segment is
used when connecting directly to the cluster. Structured
like:
projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}
|
partition_count |
int
Required. The number of partitions this topic has. The partition count can only be increased, not decreased. Please note that if partitions are increased for a topic that has a key, the partitioning logic or the ordering of the messages will be affected. |
replication_factor |
int
Required. Immutable. The number of replicas of each partition. A replication factor of 3 is recommended for high availability. |
configs |
MutableMapping[str, str]
Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: cleanup.policy ,
compression.type .
|
Classes
ConfigsEntry
ConfigsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)
The abstract base class for a message.
Parameters | |
---|---|
Name | Description |
kwargs |
dict
Keys and values corresponding to the fields of the message. |
mapping |
Union[dict,
A dictionary or message to be used to determine the values for this message. |
ignore_unknown_fields |
Optional(bool)
If True, do not raise errors for unknown fields. Only applied if |