From a460b133f710f33e99f49ce0d84cd82918370674 Mon Sep 17 00:00:00 2001 From: Jaewook Lee Date: Thu, 25 Jul 2024 17:13:35 +0900 Subject: [PATCH] Fix typo --- internal/consumer.go | 2 +- internal/consumer_test.go | 2 +- internal/producer_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/consumer.go b/internal/consumer.go index 8bf6707..ab61996 100644 --- a/internal/consumer.go +++ b/internal/consumer.go @@ -219,7 +219,7 @@ func (consumer *StreamConsumer) Transaction(producer sarama.AsyncProducer, messa if err != nil { fmt.Println("Error committing transaction:", err) consumer.handleTxnError(producer, message, session, err, func() error { - return producer.AddMessageToTxn(message, consumer.groupId, nil) + return producer.CommitTxn() }) return } diff --git a/internal/consumer_test.go b/internal/consumer_test.go index 490d263..b9c7035 100644 --- a/internal/consumer_test.go +++ b/internal/consumer_test.go @@ -11,7 +11,7 @@ import ( "time" ) -var cbrokers = []string{"localhost:9093"} +var cbrokers = []string{"kafka.vp-datacenter-1.violetpay.net:9092", "kafka.vp-datacenter-1.violetpay.net:9093", "kafka.vp-datacenter-1.violetpay.net:9094"} // TestSerializer is a mock implementation of common.MessageSerializer type TestSerializer struct { diff --git a/internal/producer_test.go b/internal/producer_test.go index f5269b6..c202159 100644 --- a/internal/producer_test.go +++ b/internal/producer_test.go @@ -8,7 +8,7 @@ import ( "testing" ) -var pbrokers = []string{"localhost:9093"} +var pbrokers = []string{"kafka.vp-datacenter-1.violetpay.net:9092", "kafka.vp-datacenter-1.violetpay.net:9093", "kafka.vp-datacenter-1.violetpay.net:9094"} func TestNewProducerPool(t *testing.T) { t.Run("NewProducerPool no configProvider", func(t *testing.T) {