Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update InactiveThreshold comments #1106

Merged
merged 2 commits into from Oct 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions js.go
Expand Up @@ -1088,7 +1088,7 @@ type ConsumerConfig struct {
DeliverSubject string `json:"deliver_subject,omitempty"`
DeliverGroup string `json:"deliver_group,omitempty"`

// Ephemeral inactivity threshold.
// Inactivity threshold.
InactiveThreshold time.Duration `json:"inactive_threshold,omitempty"`

// Generally inherited by parent stream and other markers, now can be configured directly.
Expand Down Expand Up @@ -2465,8 +2465,12 @@ func MaxRequestMaxBytes(bytes int) SubOpt {
})
}

// InactiveThreshold indicates how long the server should keep an ephemeral
// after detecting loss of interest.
// InactiveThreshold indicates how long the server should keep a consumer
// after detecting a lack of activity. In NATS Server 2.8.4 and earlier, this
// option only applies to ephemeral consumers. In NATS Server 2.9.0 and later,
// this option applies to both ephemeral and durable consumers, allowing durable
// consumers to also be deleted automatically after the inactivity threshold has
// passed.
func InactiveThreshold(threshold time.Duration) SubOpt {
return subOptFn(func(opts *subOpts) error {
if threshold < 0 {
Expand Down