Skip to content

Commit eddbdd8

Browse files
authored
[improve][doc]add more explanation for retention configuration (#16572)
1 parent b1a29b5 commit eddbdd8

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

conf/broker.conf

+6-2
Original file line numberDiff line numberDiff line change
@@ -1301,10 +1301,14 @@ replicatorPrefix=pulsar.repl
13011301
# due to missing ZooKeeper watch (disable with value 0)
13021302
replicationPolicyCheckDurationSeconds=600
13031303

1304-
# Default message retention time
1304+
# Default message retention time.
1305+
# The default value is 0, which means the data is removed after all the subscriptions are consumed.
1306+
# Value less than 0 means messages never expire.
13051307
defaultRetentionTimeInMinutes=0
13061308

1307-
# Default retention size
1309+
# Default retention size.
1310+
# The default value is 0, which means the data is removed after all the subscriptions are consumed.
1311+
# Value less than 0 means no infinite size quota.
13081312
defaultRetentionSizeInMB=0
13091313

13101314
# How often to check whether the connections are still alive

pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -2378,12 +2378,14 @@ public class ServiceConfiguration implements PulsarConfiguration {
23782378
private boolean replicationTlsEnabled = false;
23792379
@FieldContext(
23802380
category = CATEGORY_POLICIES,
2381-
doc = "Default message retention time"
2381+
doc = "Default message retention time. The default value is 0, which means the data is removed after all the "
2382+
+ "subscriptions are consumed. Value less than 0 means messages never expire."
23822383
)
23832384
private int defaultRetentionTimeInMinutes = 0;
23842385
@FieldContext(
23852386
category = CATEGORY_POLICIES,
2386-
doc = "Default retention size"
2387+
doc = "Default retention size. The default value is 0, which means the data is removed after all the "
2388+
+ "subscriptions are consumed. Value less than 0 means no infinite size quota."
23872389
)
23882390
private int defaultRetentionSizeInMB = 0;
23892391
@FieldContext(

0 commit comments

Comments
 (0)