From 8681910a0d4caa0802767b2a6c54f15971670e79 Mon Sep 17 00:00:00 2001 From: Robin Tang Date: Wed, 18 Dec 2024 11:31:00 -0800 Subject: [PATCH] Log Kafka offset (#1089) --- processes/consumer/configs.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/processes/consumer/configs.go b/processes/consumer/configs.go index 87594556a..889820407 100644 --- a/processes/consumer/configs.go +++ b/processes/consumer/configs.go @@ -2,6 +2,7 @@ package consumer import ( "context" + "log/slog" "sync" "github.com/artie-labs/transfer/lib/artie" @@ -45,6 +46,8 @@ func commitOffset(ctx context.Context, topic string, partitionsToOffset map[stri if err := topicToConsumer.Get(topic).CommitMessages(ctx, *msg.KafkaMsg); err != nil { return err } + + slog.Info("Successfully committed Kafka offset", slog.String("topic", topic), slog.Int("partition", msg.KafkaMsg.Partition), slog.Int64("offset", msg.KafkaMsg.Offset)) } if msg.PubSub != nil {