@@ -7420,7 +7420,7 @@ a list of (key, value) tuples.
7420
7420
class TopicConfig()
7421
7421
```
7422
7422
7423
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/topic.py#L44 )
7423
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/topic.py#L45 )
7424
7424
7425
7425
Represents all kafka-level configuration for a kafka topic.
7426
7426
@@ -7434,7 +7434,7 @@ Generally used by Topic and any topic creation procedures.
7434
7434
class Topic()
7435
7435
```
7436
7436
7437
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/topic.py#L85 )
7437
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/topic.py#L92 )
7438
7438
7439
7439
A definition of a Kafka topic.
7440
7440
@@ -7449,6 +7449,7 @@ instance.
7449
7449
```python
7450
7450
def __init__(
7451
7451
name: str,
7452
+ topic_type: TopicType = TopicType.REGULAR,
7452
7453
create_config: Optional[TopicConfig] = None,
7453
7454
value_deserializer: Optional[DeserializerType] = None,
7454
7455
key_deserializer: Optional[DeserializerType] = BytesDeserializer(),
@@ -7458,11 +7459,17 @@ def __init__(
7458
7459
quix_name: str = "")
7459
7460
```
7460
7461
7461
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/topic.py#L94 )
7462
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/topic.py#L101 )
7462
7463
7463
7464
**Arguments**:
7464
7465
7465
7466
- `name`: topic name
7467
+ - `topic_type`: a type of the topic, can be one of:
7468
+ - `TopicType.REGULAR` - the regular input and output topics
7469
+ - `TopicType.REPARTITION` - a repartition topic used for re-keying the data
7470
+ - `TopicType.CHANGELOG` - a changelog topic to back up the state stores.
7471
+
7472
+ Default - `TopicType.REGULAR`.
7466
7473
- `create_config`: a `TopicConfig` to create a new topic if it does not exist
7467
7474
- `value_deserializer`: a deserializer type for values
7468
7475
- `key_deserializer`: a deserializer type for keys
@@ -7482,7 +7489,7 @@ It is set only by `QuixTopicManager`.
7482
7489
def create_config() -> Optional[TopicConfig]
7483
7490
```
7484
7491
7485
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/topic.py#L144 )
7492
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/topic.py#L161 )
7486
7493
7487
7494
A config to create the topic
7488
7495
@@ -7495,7 +7502,7 @@ A config to create the topic
7495
7502
def broker_config() -> TopicConfig
7496
7503
```
7497
7504
7498
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/topic.py#L155 )
7505
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/topic.py#L172 )
7499
7506
7500
7507
A topic config obtained from the Kafka broker
7501
7508
@@ -7507,7 +7514,7 @@ A topic config obtained from the Kafka broker
7507
7514
def row_serialize(row: Row, key: Any) -> KafkaMessage
7508
7515
```
7509
7516
7510
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/topic.py#L169 )
7517
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/topic.py#L198 )
7511
7518
7512
7519
Serialize Row to a Kafka message structure
7513
7520
@@ -7530,7 +7537,7 @@ def row_deserialize(
7530
7537
) -> Union[Row, List[Row], None]
7531
7538
```
7532
7539
7533
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/topic.py#L209 )
7540
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/topic.py#L238 )
7534
7541
7535
7542
Deserialize incoming Kafka message to a Row.
7536
7543
@@ -7596,7 +7603,7 @@ def __init__(topic_admin: TopicAdmin,
7596
7603
def changelog_topics() -> Dict[Optional[str], Dict[str, Topic]]
7597
7604
```
7598
7605
7599
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L83 )
7606
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L75 )
7600
7607
7601
7608
Note: `Topic`s are the changelogs.
7602
7609
@@ -7611,7 +7618,7 @@ returns: the changelog topic dict, {topic_name: {suffix: Topic}}
7611
7618
def changelog_topics_list() -> List[Topic]
7612
7619
```
7613
7620
7614
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L92 )
7621
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L84 )
7615
7622
7616
7623
Returns a list of changelog topics
7617
7624
@@ -7626,7 +7633,7 @@ returns: the changelog topic dict, {topic_name: {suffix: Topic}}
7626
7633
def non_changelog_topics() -> Dict[str, Topic]
7627
7634
```
7628
7635
7629
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L101 )
7636
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L93 )
7630
7637
7631
7638
Returns a dict with normal and repartition topics
7632
7639
@@ -7639,7 +7646,7 @@ Returns a dict with normal and repartition topics
7639
7646
def all_topics() -> Dict[str, Topic]
7640
7647
```
7641
7648
7642
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L108 )
7649
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L100 )
7643
7650
7644
7651
Every registered topic name mapped to its respective `Topic`.
7645
7652
@@ -7655,7 +7662,7 @@ def topic_config(num_partitions: Optional[int] = None,
7655
7662
extra_config: Optional[dict] = None) -> TopicConfig
7656
7663
```
7657
7664
7658
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L116 )
7665
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L113 )
7659
7666
7660
7667
Convenience method for generating a `TopicConfig` with default settings
7661
7668
@@ -7683,7 +7690,7 @@ def topic(name: str,
7683
7690
timestamp_extractor: Optional[TimestampExtractor] = None) -> Topic
7684
7691
```
7685
7692
7686
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L138 )
7693
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L135 )
7687
7694
7688
7695
A convenience method for generating a `Topic`. Will use default config options
7689
7696
@@ -7712,7 +7719,7 @@ Topic object with creation configs
7712
7719
def register(topic: Topic) -> Topic
7713
7720
```
7714
7721
7715
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L184 )
7722
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L182 )
7716
7723
7717
7724
Register an already generated :class:`quixstreams.models.topics.Topic` to the topic manager.
7718
7725
@@ -7737,7 +7744,7 @@ def repartition_topic(
7737
7744
key_serializer: Optional[SerializerType] = "json") -> Topic
7738
7745
```
7739
7746
7740
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L203 )
7747
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L201 )
7741
7748
7742
7749
Create an internal repartition topic.
7743
7750
@@ -7764,7 +7771,7 @@ def changelog_topic(stream_id: Optional[str], store_name: str,
7764
7771
config: TopicConfig) -> Topic
7765
7772
```
7766
7773
7767
- [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L239 )
7774
+ [[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/models/topics/manager.py#L238 )
7768
7775
7769
7776
Create and register a changelog topic for the given "stream_id" and store name.
7770
7777
0 commit comments