Merge branch 'v3' into improve

This commit is contained in:
2023-03-14 09:30:23 +03:00
7 changed files with 15 additions and 167 deletions

2
kgo.go
View File

@@ -220,7 +220,7 @@ func (k *Broker) publish(ctx context.Context, msgs []*broker.Message, opts ...br
}
for _, msg := range msgs {
rec := &kgo.Record{Key: key}
rec := &kgo.Record{Context: ctx, Key: key}
rec.Topic, _ = msg.Header.Get(metadata.HeaderTopic)
if options.BodyOnly {
rec.Value = msg.Body