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: docs/pulsar_namespace.md
+46-4Lines changed: 46 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,8 @@ The `PulsarNamespace` resource defines a namespace in a Pulsar cluster. It allow
16
16
|`maxConsumersPerTopic`| Maximum number of consumers allowed on a single topic in the namespace. | No |
17
17
|`maxConsumersPerSubscription`| Maximum number of consumers allowed on a single subscription in the namespace. | No |
18
18
|`messageTTL`| Time to Live (TTL) for messages in the namespace. Messages older than this TTL will be automatically marked as consumed. | No |
19
-
|`retentionTime`| Minimum time to retain messages in the namespace. Should be set in conjunction with RetentionSize for effective retention policy. | No |
20
-
|`retentionSize`| Maximum size of backlog retained in the namespace. Should be set in conjunction with RetentionTime for effective retention policy. | No |
19
+
|`retentionTime`| Minimum time to retain messages in the namespace. Should be set in conjunction with RetentionSize for effective retention policy. Use "-1" for infinite retention time.| No |
20
+
|`retentionSize`| Maximum size of backlog retained in the namespace. Should be set in conjunction with RetentionTime for effective retention policy. Use "-1" for infinite retention size.| No |
21
21
|`backlogQuotaLimitTime`| Time limit for message backlog. Messages older than this limit will be removed or handled according to the retention policy. | No |
22
22
|`backlogQuotaLimitSize`| Size limit for message backlog. When the limit is reached, older messages will be removed or handled according to the retention policy. | No |
23
23
|`backlogQuotaRetentionPolicy`| Retention policy for messages when backlog quota is exceeded. Options: "producer_request_hold", "producer_exception", or "consumer_backlog_eviction". | No |
@@ -393,6 +393,48 @@ The `replicationClusters` and `geoReplicationRefs` fields serve different purpos
393
393
394
394
Choose `replicationClusters` for simpler, intra-instance replication, and `geoReplicationRefs` for more complex, inter-instance geo-replication scenarios. These fields are mutually exclusive; use only one depending on your replication requirements.
395
395
396
+
## Infinite Retention Configuration
397
+
398
+
The `retentionTime` and `retentionSize` fields support infinite retention by using the special value `"-1"`. This is equivalent to passing -1 to Pulsar admin APIs and provides unlimited retention capabilities for all topics within the namespace.
399
+
400
+
### Infinite Retention Time
401
+
402
+
To set infinite retention time for the namespace, use the value `"-1"` for the `retentionTime` field:
403
+
404
+
```yaml
405
+
spec:
406
+
retentionTime: "-1" # Messages will be retained indefinitely regardless of age
407
+
retentionSize: "100Gi" # Still limited by size
408
+
```
409
+
410
+
### Infinite Retention Size
411
+
412
+
To set infinite retention size for the namespace, use the value `"-1"` for the `retentionSize` field:
413
+
414
+
```yaml
415
+
spec:
416
+
retentionTime: "30d" # Still limited by time
417
+
retentionSize: "-1" # No size limit for message retention
418
+
```
419
+
420
+
### Complete Infinite Retention
421
+
422
+
For completely unlimited retention (both time and size), set both fields to `"-1"`:
423
+
424
+
```yaml
425
+
spec:
426
+
retentionTime: "-1" # Infinite time retention
427
+
retentionSize: "-1" # Infinite size retention
428
+
```
429
+
430
+
**Important Notes:**
431
+
- The `"-1"` value is case-sensitive and must be quoted in YAML
432
+
- Infinite retention should be used carefully as it can lead to unlimited storage consumption
433
+
- Retention quota must exceed configured backlog quota for the namespace
434
+
- These settings apply to all topics within the namespace by default
435
+
- Individual topics can override namespace-level retention settings
436
+
- Consider the storage and cost implications before enabling infinite retention
437
+
396
438
## Create A Pulsar Namespace
397
439
398
440
1. Define a namespace named `test-tenant/testns` by using the YAML file and save the YAML file `namespace.yaml`.
@@ -466,8 +508,8 @@ spec:
466
508
# maxProducersPerTopic: 2
467
509
# maxConsumersPerTopic: 2
468
510
# maxConsumersPerSubscription: 2
469
-
# retentionTime: 20h
470
-
# retentionSize: 2Gi
511
+
# retentionTime: 20h # or "-1" for infinite retention time
512
+
# retentionSize: 2Gi # or "-1" for infinite retention size
Copy file name to clipboardExpand all lines: docs/pulsar_topic.md
+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
@@ -19,8 +19,8 @@ The `PulsarTopic` resource defines a topic in a Pulsar cluster. It allows you to
19
19
|`messageTTL`| Time to Live (TTL) for messages in the topic. Messages older than this TTL will be automatically marked as consumed. | No |
20
20
|`maxUnAckedMessagesPerConsumer`| Maximum number of unacknowledged messages allowed per consumer. | No |
21
21
|`maxUnAckedMessagesPerSubscription`| Maximum number of unacknowledged messages allowed per subscription. | No |
22
-
|`retentionTime`| Minimum time to retain messages in the topic. Should be set in conjunction with retentionSize for effective retention policy. | No |
23
-
|`retentionSize`| Maximum size of backlog retained in the topic. Should be set in conjunction with retentionTime for effective retention policy. | No |
22
+
|`retentionTime`| Minimum time to retain messages in the topic. Should be set in conjunction with retentionSize for effective retention policy. Use "-1" for infinite retention time.| No |
23
+
|`retentionSize`| Maximum size of backlog retained in the topic. Should be set in conjunction with retentionTime for effective retention policy. Use "-1" for infinite retention size.| No |
24
24
|`backlogQuotaLimitTime`| Time limit for message backlog. Messages older than this limit will be removed or handled according to the retention policy. | No |
25
25
|`backlogQuotaLimitSize`| Size limit for message backlog. When the limit is reached, older messages will be removed or handled according to the retention policy. | No |
26
26
|`backlogQuotaRetentionPolicy`| Retention policy for messages when backlog quota is exceeded. Options: "producer_request_hold", "producer_exception", or "consumer_backlog_eviction". | No |
@@ -68,6 +68,45 @@ The `replicationClusters` and `geoReplicationRefs` fields serve different purpos
68
68
69
69
Choose `replicationClusters` for simpler, intra-instance replication, and `geoReplicationRefs` for more complex, inter-instance geo-replication scenarios. These fields are mutually exclusive; use only one depending on your replication requirements.
70
70
71
+
## Infinite Retention Configuration
72
+
73
+
The `retentionTime` and `retentionSize` fields support infinite retention by using the special value `"-1"`. This is equivalent to passing -1 to Pulsar admin APIs and provides unlimited retention capabilities.
74
+
75
+
### Infinite Retention Time
76
+
77
+
To set infinite retention time, use the value `"-1"` for the `retentionTime` field:
78
+
79
+
```yaml
80
+
spec:
81
+
retentionTime: "-1"# Messages will be retained indefinitely regardless of age
82
+
retentionSize: "10Gi"# Still limited by size
83
+
```
84
+
85
+
### Infinite Retention Size
86
+
87
+
To set infinite retention size, use the value `"-1"` for the `retentionSize` field:
88
+
89
+
```yaml
90
+
spec:
91
+
retentionTime: "7d" # Still limited by time
92
+
retentionSize: "-1" # No size limit for message retention
93
+
```
94
+
95
+
### Complete Infinite Retention
96
+
97
+
For completely unlimited retention (both time and size), set both fields to `"-1"`:
98
+
99
+
```yaml
100
+
spec:
101
+
retentionTime: "-1" # Infinite time retention
102
+
retentionSize: "-1" # Infinite size retention
103
+
```
104
+
105
+
**Important Notes:**
106
+
- The `"-1"` value is case-sensitive and must be quoted in YAML
107
+
- Infinite retention should be used carefully as it can lead to unlimited storage consumption
108
+
- Retention quota must exceed configured backlog quota for the topic
109
+
- Consider the storage and cost implications before enabling infinite retention
71
110
72
111
## Create A Pulsar Topic
73
112
@@ -89,8 +128,8 @@ spec:
89
128
# messageTTL:
90
129
# maxUnAckedMessagesPerConsumer:
91
130
# maxUnAckedMessagesPerSubscription:
92
-
# retentionTime: 20h
93
-
# retentionSize: 2Gi
131
+
# retentionTime: 20h # or "-1" for infinite retention time
132
+
# retentionSize: 2Gi # or "-1" for infinite retention size
0 commit comments