Skip to content

Commit

Permalink
https://github.com/Shopify/sarama/issues/1192
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranav committed Oct 14, 2021
1 parent f1089b8 commit f8bf90b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/kafka/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ func (c *ClaimConsumer) ConsumeClaim(sess sarama.ConsumerGroupSession, claim sar
case <-time.After(5 * time.Second):
zap.S().Info("GROUP=", c.group, ",TOPIC=", c.topicName, " - No new kafka messages, waited 5 secs...")
continue
case <-sess.Context().Done():
zap.S().Warn("GROUP=", c.group, ",TOPIC=", c.topicName, " - Session is done, exiting ConsumeClaim loop...")
return nil
}

zap.S().Info("GROUP=", c.group, ",TOPIC=", c.topicName, ",PARTITION=", topicMsg.Partition, ",OFFSET=", topicMsg.Offset, " - New message")
Expand Down

0 comments on commit f8bf90b

Please sign in to comment.