diff --git a/modules/develop/pages/config-topics.adoc b/modules/develop/pages/config-topics.adoc index 587298be27..db108ebf54 100644 --- a/modules/develop/pages/config-topics.adoc +++ b/modules/develop/pages/config-topics.adoc @@ -15,7 +15,15 @@ Creating a topic can be as simple as specifying a name for your topic on the com rpk topic create xyz ---- -This command creates a topic named `xyz` with one partition and one replica, because these are the default values set in the cluster configuration file. +ifndef::env-cloud[] +This command creates a topic named `xyz` with one partition and one replica, because these are the default values set in the cluster configuration file. Replicas are copies of partitions that are distributed across different brokers, so if one broker goes down, other brokers still have a copy of the data. + +endif::[] + +ifdef::env-cloud[] +This command creates a topic named `xyz` with one partition and three replicas, because these are the default values set in the cluster configuration file. Replicas are copies of partitions that are distributed across different brokers, so if one broker goes down, other brokers still have a copy of the data. + +endif::[] This section shows how to change default settings for a topic. @@ -35,9 +43,7 @@ rpk topic create xyz -p 10 ifndef::env-cloud[] === Choose the replication factor -Replicas are copies of partitions that are distributed across different brokers, so if one broker goes down, other brokers still have a copy of the data. The default replication factor in the cluster configuration is set to 1. - -By choosing a replication factor greater than 1, you ensure that each partition has a copy of its data on at least one other broker. One replica acts as the leader, and the other replicas are followers. +The default replication factor in the cluster configuration is set to 1. By choosing a replication factor greater than 1, you ensure that each partition has a copy of its data on at least one other broker. One replica acts as the leader, and the other replicas are followers. To specify a replication factor of 3 for topic `xyz`, run: @@ -158,6 +164,7 @@ The `-c` flag limits the command output to just the topic configurations. This c The following command output displays after running `rpk topic describe test-topic`, where `test-topic` was created with default settings: +ifndef::env-cloud[] [,bash] ---- rpk topic describe test_topic @@ -196,6 +203,38 @@ PARTITIONS 3 REPLICAS 3 ---- +endif::[] + +ifdef::env-cloud[] +[,bash] +---- +rpk topic describe test_topic +SUMMARY +======= +NAME test_topic +PARTITIONS 1 +REPLICAS 3 + +CONFIGS +======= +KEY VALUE SOURCE +cleanup.policy delete DYNAMIC_TOPIC_CONFIG +compression.type producer DEFAULT_CONFIG +max.message.bytes 1048576 DEFAULT_CONFIG +message.timestamp.type CreateTime DEFAULT_CONFIG +redpanda.datapolicy function_name: script_name: DEFAULT_CONFIG +redpanda.remote.delete true DEFAULT_CONFIG +redpanda.remote.read false DEFAULT_CONFIG +redpanda.remote.write false DEFAULT_CONFIG +retention.bytes -1 DEFAULT_CONFIG +retention.local.target.bytes -1 DEFAULT_CONFIG +retention.local.target.ms 86400000 DEFAULT_CONFIG +retention.ms 604800000 DEFAULT_CONFIG +segment.bytes 1073741824 DEFAULT_CONFIG +---- + +endif::[] + == Delete a topic To delete a topic, run: diff --git a/modules/reference/pages/properties/cluster-properties.adoc b/modules/reference/pages/properties/cluster-properties.adoc index 0e61bf9c4a..84f4e31c82 100644 --- a/modules/reference/pages/properties/cluster-properties.adoc +++ b/modules/reference/pages/properties/cluster-properties.adoc @@ -936,6 +936,8 @@ Default replication factor for new topics. *Default:* `1` +NOTE: In Redpanda Cloud, all new topics are created with a replication factor of 3. + --- === default_window_sec diff --git a/modules/reference/pages/rpk/rpk-topic/rpk-topic-create.adoc b/modules/reference/pages/rpk/rpk-topic/rpk-topic-create.adoc index 88c1053c9a..62fe930ba5 100644 --- a/modules/reference/pages/rpk/rpk-topic/rpk-topic-create.adoc +++ b/modules/reference/pages/rpk/rpk-topic/rpk-topic-create.adoc @@ -33,7 +33,7 @@ create topics. defaults to the cluster property `default_topic_partitions` (default `-1`). |-r, --replicas |int16 |Replication factor (must be odd); -1 defaults to -the cluster's default_topic_replications (default -1). +the cluster's default_topic_replications (default -1). In Redpanda Cloud, the replication factor is set to 3. |-c, --topic-config |string (repeatable) |Topic properties can be set by using `=`. For example `-c cleanup.policy=compact`. This flag is repeatable, so you can set multiple parameters in a single command.