Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
| Sarama | Kafka | Go |
|--------|-------|----|
v1.26.1 | Amazon MSK 2.2.0 | 1.13.5
-- | -- | --
| | | |
panic: non-positive interval for NewTicker
ticker := time.NewTicker(c.client.config.Consumer.Offsets.CommitInterval)
// Deprecated: CommitInterval exists for historical compatibility
// and should not be used. Please use Consumer.Offsets.AutoCommit
CommitInterval time.Duration
How can I set this CommitInterval?
seems like a bug, got similar issue. I've worked around it by doing this:
clusterConfig.Consumer.Offsets.CommitInterval = time.Second
I have the same issue. Seems like a regression in 1.26.1
Setting Consumer.Offsets.CommitInterval to 1 seems to get it running again.
Me too. I use "github.com/bsm/sarama-cluster" with kafka consumer group feature
Use this github.com/bsm/sarama-cluster v2.1.15+incompatible
@soouCc have you tried using the following with a recent Sarama release?
config.Consumer.Offsets.AutoCommit.Interval = 1 * time.Second
@d1egoaz
config.Consumer.Offsets.AutoCommit.Interval = 1 * time.Second
Hello, I try it, but it doesn't work.
clusterConfig.Consumer.Offsets.CommitInterval = time.Second
This works
clusterConfig.Consumer.Offsets.CommitInterval is deprecated
You need to use next one for fixing problem
cfg.Consumer.Offsets.AutoCommit.Enable = true
cfg.Consumer.Offsets.AutoCommit.Interval = time.Second
@d1egoaz
config.Consumer.Offsets.AutoCommit.Interval = 1 * time.SecondHello, I try it, but it doesn't work.
clusterConfig.Consumer.Offsets.CommitInterval = time.SecondThis works
It works if you turn on flag cfg.Consumer.Offsets.AutoCommit.Enable = true
Most helpful comment
seems like a bug, got similar issue. I've worked around it by doing this:
clusterConfig.Consumer.Offsets.CommitInterval = time.Second