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

Consumer documentation says it defaults to 5s timeout, but uses a 5m by default #1820

Open
Zambito1 opened this issue Mar 14, 2025 · 0 comments
Labels
defect Suspected defect such as a bug or regression

Comments

@Zambito1
Copy link

Observed behavior

See line 610

cfg := &ConsumerConfig{
Name: name,
DeliverPolicy: DeliverByStartSequencePolicy,
OptStartSeq: nextSeq,
AckPolicy: AckNonePolicy,
InactiveThreshold: 5 * time.Minute,
Replicas: 1,
HeadersOnly: c.cfg.HeadersOnly,
MemoryStorage: true,
Metadata: c.cfg.Metadata,
}

Expected behavior

See line 195

// InactiveThreshold is a duration which instructs the server to clean
// up the consumer if it has been inactive for the specified duration.
// Durable consumers will not be cleaned up by default, but if
// InactiveThreshold is set, they will be. If not set, this will inherit
// settings from stream's ConsumerLimits. If neither are set, server
// default is 5 seconds.
//
// A consumer is considered inactive there are not pull requests
// received by the server (for pull consumers), or no interest detected
// on deliver subject (for push consumers), not if there are no
// messages to be delivered.
InactiveThreshold time.Duration `json:"inactive_threshold,omitempty"`

See line 256

// InactiveThreshold is a duration which instructs the server to clean
// up the consumer if it has been inactive for the specified duration.
// Defaults to 5s.
InactiveThreshold time.Duration `json:"inactive_threshold,omitempty"`

The docs and the behavior should line up

Server and client version

Client: da7160e

Host environment

N/A

Steps to reproduce

N/A

@Zambito1 Zambito1 added the defect Suspected defect such as a bug or regression label Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

No branches or pull requests

1 participant