Skip to content

Commit

Permalink
Fix: Kafka consumer fails to reconnect and sensor stops working (#3495)
Browse files Browse the repository at this point in the history
Signed-off-by: Siva Munukutla <[email protected]>
  • Loading branch information
smunukutla-mycarrier authored Mar 8, 2025
1 parent b29e5ba commit 3595e84
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/eventbus/kafka/sensor/kafka_sensor.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ func (s *KafkaSensor) Listen(ctx context.Context) {
)
}

// Fail fast if the server returns an incomplete response
if err == sarama.ErrIncompleteResponse {
s.Logger.Fatalw("Kafka error", zap.Error(err))
}

s.Logger.Errorw("Failed to consume", zap.Error(err))
return
}
Expand Down

0 comments on commit 3595e84

Please sign in to comment.