about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2024-05-03 11:19:50 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2024-05-03 11:19:50 +0200
commit12cc3141a46a883552a92aa099a7a23e6c9a1de4 (patch)
tree35d9852ade302956c78df165da66572b14c8d1de
parentrest-api: Write to kafka asynchronously (diff)
downloadfs-tracer-backend-12cc3141a46a883552a92aa099a7a23e6c9a1de4.tar.gz
fs-tracer-backend-12cc3141a46a883552a92aa099a7a23e6c9a1de4.tar.bz2
fs-tracer-backend-12cc3141a46a883552a92aa099a7a23e6c9a1de4.zip
payload-processor: print current time when processing
-rw-r--r--TODO4
-rw-r--r--src/payload-processor/processor/processor.go3
2 files changed, 4 insertions, 3 deletions
diff --git a/TODO b/TODO
index a129f45..5ac71b0 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-bazel
-local kubernetes access from other pcs
+helmsfile o algo asi
+kafka UI
 nixos-k3s repo
 klipper-lb
diff --git a/src/payload-processor/processor/processor.go b/src/payload-processor/processor/processor.go
index 435a954..b673a15 100644
--- a/src/payload-processor/processor/processor.go
+++ b/src/payload-processor/processor/processor.go
@@ -4,6 +4,7 @@ import (
 	"context"
 	"fmt"
 	"log"
+	"time"
 
 	"github.com/segmentio/kafka-go"
 )
@@ -25,7 +26,7 @@ func (p Processor) ProcessMessages() {
 		if err != nil {
 			break
 		}
-		fmt.Printf("message at offset %d: %s = %s\n", m.Offset, string(m.Key), string(m.Value))
+		fmt.Printf("(%s)message at offset %d: %s = %s\n", time.Now().String(), m.Offset, string(m.Key), string(m.Value))
 	}
 
 	if err := p.kafka_reader.Close(); err != nil {