cleanup
All checks were successful
test / test (push) Successful in 2m19s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2025-02-27 12:41:42 +03:00
parent aaf8c43e04
commit 51e4118dfc
2 changed files with 4 additions and 5 deletions

6
kgo.go
View File

@@ -267,7 +267,7 @@ func (k *Broker) publish(ctx context.Context, msgs []*broker.Message, opts ...br
k.connected.Store(1)
}
k.Unlock()
fmt.Printf("EEE\n")
options := broker.NewPublishOptions(opts...)
records := make([]*kgo.Record, 0, len(msgs))
var errs []string
@@ -322,9 +322,9 @@ func (k *Broker) publish(ctx context.Context, msgs []*broker.Message, opts ...br
return nil
}
ts := time.Now()
fmt.Printf("SSSSSSEEE\n")
results := k.c.ProduceSync(ctx, records...)
fmt.Printf("SSSSSS\n")
te := time.Since(ts)
for _, result := range results {
k.opts.Meter.Summary(semconv.PublishMessageLatencyMicroseconds, "endpoint", result.Record.Topic, "topic", result.Record.Topic).Update(te.Seconds())