From 6360f5e78f7ca9506029db537fec9d4fffe0b3ca Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Tue, 11 Oct 2022 11:55:12 +0300 Subject: [PATCH] propogate context to kgo record Signed-off-by: Vasiliy Tolstov --- kgo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kgo.go b/kgo.go index 1b8a337..32df6aa 100644 --- a/kgo.go +++ b/kgo.go @@ -262,7 +262,7 @@ func (k *kBroker) publish(ctx context.Context, msgs []*broker.Message, opts ...b } for _, msg := range msgs { - rec := &kgo.Record{Key: key} + rec := &kgo.Record{Context: ctx, Key: key} rec.Topic, _ = msg.Header.Get(metadata.HeaderTopic) if k.opts.Codec.String() == "noop" { rec.Value = msg.Body