You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
Sarama
Kafka
Go
1.33
2.12-2.3.1
go16
Configuration
What configuration values are you using for Sarama and Kafka?
func (consumer*Consumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error {
// NOTE:// Do not move the code below to a goroutine.// The `ConsumeClaim` itself is called within a goroutine, see:// https://github.com/Shopify/sarama/blob/main/consumer_group.go#L27-L29for {
select {
casemessage:=<-claim.Messages():
log.Printf("Message claimed: value = %s, timestamp = %v, topic = %s", string(message.Value), message.Timestamp, message.Topic)
session.MarkMessage(message, "")
// Should return when `session.Context()` is done.// If not, will raise `ErrRebalanceInProgress` or `read tcp <ip>:<port>: i/o timeout` when kafka rebalance. see:// https://github.com/Shopify/sarama/issues/1192case<-session.Context().Done():
returnnil
}
}
}
Versions
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
Configuration
What configuration values are you using for Sarama and Kafka?
Logs
Problem Description
this code may got nil with message? and then print cause panic
The text was updated successfully, but these errors were encountered: