sarama
sarama copied to clipboard
panic: send on closed channel
Versions
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
Sarama | Kafka | Go |
---|---|---|
v1.29 | 2.4.1 | go1.17.6 |
Configuration
kafka.KafkaOptions{
Enabled: false,
Name: name,
Topic: "test",
Brokers: []string{},
BufferMemory: 2147483648,
LingerInterval: time.Millisecond * 10,
BatchSize: 65536,
CompressionType: "none",
ProducerLatencyTime: time.Millisecond * 60,
SaslEnabled: false,
SaslMechanism: "SASLTypePlaintext",
SslEnabled: false,
SslCertificate: "",
SslCertificateKey: "",
SslCaCertificate: "",
MaxMessageBytes: 10485760,
Version: sarama.MaxVersion,
SslSkipVerify: false,
MsgTimeoutWarn: time.Millisecond * 10000,
KeySerializer: "org.apache.kafka.common.serialization.ByteArraySerializer",
ValueSerializer: "org.apache.kafka.common.serialization.ByteArraySerializer",
Acks: "local",
Retry: 5,
Workers: 1,
SendBufferBytes: 10485760,
ReceiveBufferBytes: 10485760,
MaxRequestSize: 10485760,
panic: send on closed channel
goroutine 74 [running]: github.com/Shopify/sarama.(*asyncProducer).shutdown(0xc0003080e0) /Users/a/go/pkg/mod/github.com/!shopify/[email protected]/async_producer.go:1057 +0xa8 github.com/Shopify/sarama.withRecover(0x0) /Users/a/go/pkg/mod/github.com/!shopify/[email protected]/utils.go:43 +0x3e created by github.com/Shopify/sarama.(*asyncProducer).AsyncClose /Users/a/go/pkg/mod/github.com/!shopify/[email protected]/async_producer.go:322 +0x9d exit status 2
Problem Description
When trying to shutdown Kafka producer using producer.Close() we are seeing this issue.
I guess they share same root casue. https://github.com/Shopify/sarama/issues/1441
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 main 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.
Closing as duplicate of #1441 — feel free to re-open if that's not the case