You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/develop/pages/config-topics.adoc
+43-4Lines changed: 43 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,15 @@ Creating a topic can be as simple as specifying a name for your topic on the com
15
15
rpk topic create xyz
16
16
----
17
17
18
-
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.
18
+
ifndef::env-cloud[]
19
+
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.
20
+
21
+
endif::[]
22
+
23
+
ifdef::env-cloud[]
24
+
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.
25
+
26
+
endif::[]
19
27
20
28
This section shows how to change default settings for a topic.
21
29
@@ -35,9 +43,7 @@ rpk topic create xyz -p 10
35
43
ifndef::env-cloud[]
36
44
=== Choose the replication factor
37
45
38
-
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.
39
-
40
-
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.
46
+
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.
41
47
42
48
To specify a replication factor of 3 for topic `xyz`, run:
43
49
@@ -158,6 +164,7 @@ The `-c` flag limits the command output to just the topic configurations. This c
158
164
159
165
The following command output displays after running `rpk topic describe test-topic`, where `test-topic` was created with default settings:
Copy file name to clipboardExpand all lines: modules/reference/pages/rpk/rpk-topic/rpk-topic-create.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ create topics.
33
33
defaults to the cluster property `default_topic_partitions` (default `-1`).
34
34
35
35
|-r, --replicas |int16 |Replication factor (must be odd); -1 defaults to
36
-
the cluster's default_topic_replications (default -1).
36
+
the cluster's default_topic_replications (default -1). In Redpanda Cloud, the replication factor is set to 3.
37
37
38
38
|-c, --topic-config |string (repeatable) |Topic properties can be set by using `<key>=<value>`. For example `-c cleanup.policy=compact`. This flag is repeatable, so you can set multiple parameters in a single command.
0 commit comments