update metadata

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-11-18 12:24:58 +03:00
parent 15a5d7d2cd
commit 2ed58a202b
4 changed files with 32 additions and 11 deletions

View File

@@ -626,7 +626,7 @@ func (g *grpcClient) Publish(ctx context.Context, p client.Message, opts ...clie
md, ok := metadata.FromContext(ctx)
if !ok {
md = make(map[string]string)
md = metadata.New(0)
}
md["Content-Type"] = p.ContentType()
md["Micro-Topic"] = p.Topic()