Skip to content

Commit

Permalink
Merge pull request #320 from nats-io/subject_delete_marker_ttl_duration
Browse files Browse the repository at this point in the history
Use time.Duration for subject_delete_marker_ttl
  • Loading branch information
ripienaar authored Jan 27, 2025
2 parents 57b94a7 + 857591f commit fab59f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions adr/ADR-43.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ type StreamConfig struct {

// Enables placing markers in the stream for certain message delete operations
SubjectDeleteMarkers bool `json:"subject_delete_markers,omitempty"`
// When placing a marker, how long should it be valid, defaults to 15m
SubjectDeleteMarkerTTL string `json:"subject_delete_marker_ttl,omitempty"`
// When placing a marker, how long should it be valid, defaults to 15m when <= 0 or unset
SubjectDeleteMarkerTTL time.Duration `json:"subject_delete_marker_ttl,omitempty"`
}
```

Expand All @@ -82,7 +82,7 @@ Restrictions:
* The `SubjectDeleteMarkers` setting may not be set on a Mirror Stream.
* The `SubjectDeleteMarkers` setting requires `AllowMsgTTL` and must error when not set.
* The `SubjectDeleteMarkerTTL` may only be set when `SubjectDeleteMarkers` is set.
* When `SubjectDeleteMarkerTTL` is unset the server will use `15m` as the default and will update the supplied configuration.
* When `SubjectDeleteMarkerTTL` is unset the server will use `900000000000` (15 minutes) as the default and will update the supplied configuration.
* When `SubjectDeleteMarkerTTL` is not given with `SubjectDeleteMarkers` set in Pedantic mode no default will be set and the request will fail.
* When `AllowMsgTTL` or `SubjectDeleteMarkers` are set the Stream should require API level `1`.

0 comments on commit fab59f0

Please sign in to comment.