Skip to content

Commit

Permalink
fix: Kafka commit session end of consume claim
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Collins <[email protected]>
  • Loading branch information
alexec committed Sep 20, 2021
1 parent a618b38 commit 40eac37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions runner/sidecar/source/kafka/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func (h *handler) Cleanup(sess sarama.ConsumerGroupSession) error {
func (h *handler) ConsumeClaim(sess sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error {
ctx := sess.Context()
logger.Info("starting consuming claim", "partition", claim.Partition())
defer sess.Commit()
for msg := range claim.Messages() {
if err := h.processMessage(ctx, msg); err != nil {
logger.Error(err, "failed to process message")
Expand Down
4 changes: 2 additions & 2 deletions test/kafka-stress/test-results.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"TestKafkaSinkStress/.tps": 750,
"TestKafkaSinkStress/.tps": 600,
"TestKafkaSinkStress/N=10,messageSize=100.tps": 200,
"TestKafkaSinkStress/N=10,messageSize=1000.tps": 150,
"TestKafkaSinkStress/N=50000.tps": 750,
"TestKafkaSinkStress/async=true.tps": 400,
"TestKafkaSinkStress/messageSize=1000.tps": 300,
"TestKafkaSinkStress/replicas=2.tps": 400,
"TestKafkaSourceStress/.tps": 3450,
"TestKafkaSourceStress/.tps": 1300,
"TestKafkaSourceStress/N=10,messageSize=100.tps": 450,
"TestKafkaSourceStress/N=10,messageSize=1000.tps": 650,
"TestKafkaSourceStress/N=50000.tps": 3150,
Expand Down

0 comments on commit 40eac37

Please sign in to comment.