Prevent panic when marking the offset in kafka_consumer (#5118)
This commit is contained in:
parent
adce43f546
commit
d0a6051fd7
|
@ -275,6 +275,7 @@ func (k *Kafka) onDelivery(track telegraf.DeliveryInfo) {
|
||||||
msg, ok := k.messages[track.ID()]
|
msg, ok := k.messages[track.ID()]
|
||||||
if !ok {
|
if !ok {
|
||||||
log.Printf("E! [inputs.kafka_consumer] Could not mark message delivered: %d", track.ID())
|
log.Printf("E! [inputs.kafka_consumer] Could not mark message delivered: %d", track.ID())
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if track.Delivered() {
|
if track.Delivered() {
|
||||||
|
|
Loading…
Reference in New Issue