new kgo version
All checks were successful
sync / sync (push) Has been skipped
coverage / build (push) Successful in 4m56s
test / test (push) Successful in 4m59s

update deps

fixup race conditions

add kfake usage

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2025-05-11 01:49:38 +03:00
parent ccd912adb2
commit e34f57a515
6 changed files with 104 additions and 74 deletions

4
kgo.go
View File

@@ -152,6 +152,10 @@ func (b *Broker) newCodec(ct string) (codec.Codec, error) {
func (b *Broker) NewMessage(ctx context.Context, hdr metadata.Metadata, body interface{}, opts ...broker.PublishOption) (broker.Message, error) {
options := broker.NewPublishOptions(opts...)
if options.ContentType == "" {
options.ContentType = b.opts.ContentType
}
m := &kgoMessage{ctx: ctx, hdr: hdr, opts: options}
c, err := b.newCodec(m.opts.ContentType)
if err == nil {