File tree 1 file changed +1
-18
lines changed
1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package kafkaqueue
2
2
3
3
import (
4
4
"context"
5
- "encoding/json"
6
5
"errors"
7
6
"github.com/IBM/sarama"
8
7
"github.com/violetpay-org/event-queue/queue"
@@ -308,30 +307,14 @@ func (k *BytesProduceOperator) Produce(message []byte) error {
308
307
return errors .New ("message is nil" )
309
308
}
310
309
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 {
322
311
Topic : k .topic ,
323
312
Value : sarama .ByteEncoder (message ),
324
313
})
325
314
326
- log .Print ("Produced. BeforeProduce Count (썩세스만): " , count .Load ())
327
-
328
315
if err != nil {
329
316
return err
330
317
}
331
318
332
319
return nil
333
320
}
334
-
335
- type testStruct struct {
336
- Status string `json:"status"`
337
- }
You can’t perform that action at this time.
0 commit comments