feat: modify kafka writer's options
This commit is contained in:
parent
cbe2bcfe45
commit
bd2c08aa53
9
main.go
9
main.go
@ -185,9 +185,12 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
writer := &kafka.Writer{
|
writer := &kafka.Writer{
|
||||||
Addr: kafka.TCP(strings.Split(KAFKA_BROKERS, ",")...),
|
Addr: kafka.TCP(strings.Split(KAFKA_BROKERS, ",")...),
|
||||||
Topic: KAFKA_TOPIC,
|
Topic: KAFKA_TOPIC,
|
||||||
Balancer: &kafka.LeastBytes{},
|
AllowAutoTopicCreation: true,
|
||||||
|
Balancer: &kafka.LeastBytes{},
|
||||||
|
BatchTimeout: 10 * time.Millisecond,
|
||||||
|
Async: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
app.Post("/api/streams/telemetry", func(c *fiber.Ctx) error {
|
app.Post("/api/streams/telemetry", func(c *fiber.Ctx) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user