Skip to content

Commit

Permalink
feat(kafka): try with equality match
Browse files Browse the repository at this point in the history
  • Loading branch information
grandwizard28 committed Oct 8, 2024
1 parent 8977dc8 commit 7d29ef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions receiver/signozkafkareceiver/kafka_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ type baseConsumerGroupHandler struct {
func (b *baseConsumerGroupHandler) WithMemoryLimiter(ctx context.Context, claim sarama.ConsumerGroupClaim, consume func() error) error {
// Execute f() immediately
err := consume()
if err == nil || !errors.Is(err, errHighMemoryUsage) {
if err == nil || !(err.Error() == errHighMemoryUsage.Error()) {
return err
}

Expand All @@ -514,7 +514,7 @@ func (b *baseConsumerGroupHandler) WithMemoryLimiter(ctx context.Context, claim
b.resumePartition <- claim.Partition()
return nil
}
if !errors.Is(err, errHighMemoryUsage) {
if !(err.Error() == errHighMemoryUsage.Error()) {
b.resumePartition <- claim.Partition()
return err
}
Expand Down

0 comments on commit 7d29ef2

Please sign in to comment.