Skip to content

Commit 3595e84

Browse files
Fix: Kafka consumer fails to reconnect and sensor stops working (#3495)
Signed-off-by: Siva Munukutla <[email protected]>
1 parent b29e5ba commit 3595e84

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/eventbus/kafka/sensor/kafka_sensor.go

+5
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,11 @@ func (s *KafkaSensor) Listen(ctx context.Context) {
219219
)
220220
}
221221

222+
// Fail fast if the server returns an incomplete response
223+
if err == sarama.ErrIncompleteResponse {
224+
s.Logger.Fatalw("Kafka error", zap.Error(err))
225+
}
226+
222227
s.Logger.Errorw("Failed to consume", zap.Error(err))
223228
return
224229
}

0 commit comments

Comments
 (0)