feat: modify kafka writer's options
This commit is contained in:
parent
cbe2bcfe45
commit
bd2c08aa53
3
main.go
3
main.go
@ -187,7 +187,10 @@ 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,
|
||||||
|
AllowAutoTopicCreation: true,
|
||||||
Balancer: &kafka.LeastBytes{},
|
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