added producer metrics, modified kafka write logic

This commit is contained in:
aishwarya-raimule
2023-01-12 12:59:22 +05:30
parent 755b85ef15
commit e940f69528
8 changed files with 95 additions and 30 deletions

7
utils/time.go Normal file
View File

@@ -0,0 +1,7 @@
package utils
import "time"
func NanosToMillis(timestamp int64) int64 {
return timestamp * (int64(time.Nanosecond) / int64(time.Millisecond))
}