Closed lockfu closed 1 year ago
Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur. Please check if the master branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.
Versions
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
Configuration
type Kafka struct { brokers []string topics []string //OffsetNewest int64 = -1 //OffsetOldest int64 = -2 startOffset int64 version string ready chan bool group string channelBufferSize int }
func NewKafka() *Kafka { return &Kafka{ brokers: brokers, topics: []string{ topics, }, group: group, channelBufferSize: 2, ready: make(chan bool), //version:"1.1.1", } }
var brokers = []string{"xx","xx","xx"} var topics = "xx" var group = "xx"
func (p *Kafka) Init() func() { println("kafka init...")
}
// Setup is run at the beginning of a new session, before ConsumeClaim func (p *Kafka) Setup(NewSamara.ConsumerGroupSession) error { // Mark the consumer as ready close(p.ready) return nil }
// Cleanup is run at the end of a session, once all ConsumeClaim goroutines have exited func (p *Kafka) Cleanup(NewSamara.ConsumerGroupSession) error { return nil }
// ConsumeClaim must start a consumer loop of ConsumerGroupClaim's Messages(). func (p *Kafka) ConsumeClaim(session NewSamara.ConsumerGroupSession, claim NewSamara.ConsumerGroupClaim) error {
}
func main() { k := NewKafka() f := k.Init()
} What configuration values are you using for Sarama and Kafka?
Logs
When filing an issue please provide logs from Sarama and Kafka if at all possible. You can set
sarama.Logger
to alog.Logger
to capture Sarama debug output.logs: CLICK ME
``` ```
Problem Description
Hi all, i use sarama1.27.0 to consume topics, and it will consume again when all the claims consumed. so it's a rebalance? Does sarama do not polling claims from kafka. or just get some claims and consume it, and then get claims again with rebalance. thx.