From 7e4477dcb4a845229d5a40ba929df268f921ac60 Mon Sep 17 00:00:00 2001 From: Evstigneev Denis Date: Fri, 17 Jan 2025 15:38:53 +0300 Subject: [PATCH] move set content-type in client publish --- client/noop.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/noop.go b/client/noop.go index f8f56265..02be926d 100644 --- a/client/noop.go +++ b/client/noop.go @@ -588,7 +588,6 @@ func (n *noopClient) publish(ctx context.Context, ps []Message, opts ...PublishO for _, p := range ps { md := metadata.Copy(omd) - md[metadata.HeaderContentType] = p.ContentType() topic := p.Topic() if len(exchange) > 0 { topic = exchange @@ -600,6 +599,8 @@ func (n *noopClient) publish(ctx context.Context, ps []Message, opts ...PublishO md.Set(k, v) } + md[metadata.HeaderContentType] = p.ContentType() + var body []byte // passed in raw data