fix MessageMetadata option
Some checks failed
codeql / analyze (go) (pull_request) Failing after 1m18s
prbuild / test (pull_request) Failing after 1m4s
prbuild / lint (pull_request) Successful in 22s
autoapprove / autoapprove (pull_request) Failing after 8s
automerge / automerge (pull_request) Failing after 3s
dependabot-automerge / automerge (pull_request) Has been skipped

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2023-10-26 03:12:32 +03:00
parent 603b855e2a
commit 0f8d0a1123
3 changed files with 27 additions and 21 deletions

View File

@@ -730,6 +730,12 @@ func (g *grpcClient) publish(ctx context.Context, ps []client.Message, opts ...c
md := metadata.Copy(omd)
md[metadata.HeaderContentType] = p.ContentType()
iter := p.Metadata().Iterator()
var k, v string
for iter.Next(&k, &v) {
md.Set(k, v)
}
// passed in raw data
if d, ok := p.Payload().(*codec.Frame); ok {
body = d.Data