Skip to content

Commit

Permalink
chore: Add default (#17912)
Browse files Browse the repository at this point in the history
Follow-up for #17910
  • Loading branch information
candiduslynx committed May 8, 2024
1 parent e7f5a87 commit 84ea568
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
6 changes: 4 additions & 2 deletions plugins/destination/kafka/client/spec/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions plugins/destination/kafka/client/spec/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (

type topicDetails struct {
// Number of partitions to create for the topic.
NumPartitions int `json:"num_partitions,omitempty" jsonschema:"minimum=1"`
NumPartitions int `json:"num_partitions,omitempty" jsonschema:"minimum=1,default=1"`
// Replication factor for the topic.
ReplicationFactor int `json:"replication_factor,omitempty" jsonschema:"minimum=1"`
ReplicationFactor int `json:"replication_factor,omitempty" jsonschema:"minimum=1,default=1"`
}

type Spec struct {
Expand Down
3 changes: 3 additions & 0 deletions plugins/destination/kafka/docs/_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ spec:
# client_id: cq-destination-kafka
# verbose: false
# batch_size: 1000
# topic_details:
# num_partitions: 1
# replication_factor: 1
```

Note that the Kafka plugin only supports `append` `write_mode`. The (top level) spec section is described in the [Destination Spec Reference](/docs/reference/destination-spec).
2 changes: 1 addition & 1 deletion plugins/destination/kafka/docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ This is the (nested) plugin spec

Number of partitions for the newly created topic.

- `replication_factor` (`integer`) (optional) (1: `1000`)
- `replication_factor` (`integer`) (optional) (default: `1`)

Replication factor for the topic.

0 comments on commit 84ea568

Please sign in to comment.