childe / healer

golang lib for kafka
22 stars 18 forks source link

panic #26

Closed gemiit closed 3 weeks ago

gemiit commented 1 year ago

panic: runtime error: slice bounds out of range [:24956] with capacity 41

goroutine 152 [running]: github.com/childe/healer.NewOffsetFetchResponse({0xc000174000, 0x29, 0x29}) /opt/go/pkg/mod/github.com/childe/healer@v0.4.2/offset_fetch_response.go:60 +0x715 github.com/childe/healer.defaultReadParser.Parse({0xc00007e720?, 0xeeff?, 0x72?, 0x7530?}, {0xc000174000?, 0x0?, 0x26?}) /opt/go/pkg/mod/github.com/childe/healer@v0.4.2/response.go:109 +0x274 github.com/childe/healer.defaultReadParser.ReadAndParse({0xc00007e720?, 0xba98?, 0x29?, 0xc0007cdd50?}) /opt/go/pkg/mod/github.com/childe/healer@v0.4.2/response.go:38 +0x185 github.com/childe/healer.(SimpleConsumer).getCommitedOffet(0xc0001f1d40) /opt/go/pkg/mod/github.com/childe/healer@v0.4.2/simple_consumer.go:237 +0x595 github.com/childe/healer.(SimpleConsumer).Consume(0xc0001f1d40, 0xfffffffffffffffe, 0x0?) /opt/go/pkg/mod/github.com/childe/healer@v0.4.2/simple_consumer.go:356 +0x2c5 created by github.com/childe/healer.(*GroupConsumer).consumeWithoutHeartBeat /opt/go/pkg/mod/github.com/childe/healer@v0.4.2/group_consumer.go:543 +0x18d

childe commented 1 year ago

最近改动比较多,方便先升到 v0.5.0 试一下吗?

gemiit commented 1 year ago

v0.5.4 没有GetProducerConfig这个方法了

childe commented 1 year ago

GetProducerConfig

可以直接使用 consoleProducer, err := healer.NewProducer(topic, producerConfig),可以参考https://github.com/childe/healer/blob/master/command/cmd/console-producer.go