Skip to content

Commit

Permalink
Merge pull request #31 from wolfapple/fix/rebalancing
Browse files Browse the repository at this point in the history
Patch sarama_kafka rebalance fix
  • Loading branch information
m110 authored Jun 27, 2024
2 parents 2664bae + 05d796c commit bfef80e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/kafka/subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,10 @@ func (h consumerGroupHandler) ConsumeClaim(sess sarama.ConsumerGroupSession, cla
case <-h.ctx.Done():
h.logger.Debug("Ctx was cancelled, stopping consumerGroupHandler", logFields)
return nil

case <-sess.Context().Done():
h.logger.Debug("Session ctx was cancelled, stopping consumerGroupHandler", logFields)
return nil
default:
continue
}
Expand Down

0 comments on commit bfef80e

Please sign in to comment.