Skip to content

Commit 5592835

Browse files
committed
Chore: disable logging before produce
1 parent 5ba78b0 commit 5592835

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

internal/queue/kafka/operator.go

+1-18
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package kafkaqueue
22

33
import (
44
"context"
5-
"encoding/json"
65
"errors"
76
"github.com/IBM/sarama"
87
"github.com/violetpay-org/event-queue/queue"
@@ -308,30 +307,14 @@ func (k *BytesProduceOperator) Produce(message []byte) error {
308307
return errors.New("message is nil")
309308
}
310309

311-
var test testStruct
312-
err := json.Unmarshal(message, &test)
313-
if err != nil {
314-
return err
315-
}
316-
317-
if test.Status == "success" {
318-
count.Add(1)
319-
}
320-
321-
_, _, err = producer.SendMessage(&sarama.ProducerMessage{
310+
_, _, err := producer.SendMessage(&sarama.ProducerMessage{
322311
Topic: k.topic,
323312
Value: sarama.ByteEncoder(message),
324313
})
325314

326-
log.Print("Produced. BeforeProduce Count (썩세스만): ", count.Load())
327-
328315
if err != nil {
329316
return err
330317
}
331318

332319
return nil
333320
}
334-
335-
type testStruct struct {
336-
Status string `json:"status"`
337-
}

0 commit comments

Comments
 (0)