client: allow to publish body only

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-06-13 12:20:35 +03:00
parent 919520219c
commit 6e55d07636
1 changed files with 4 additions and 1 deletions

View File

@ -221,5 +221,8 @@ func (n *noopClient) Publish(ctx context.Context, p Message, opts ...PublishOpti
return n.opts.Broker.Publish(ctx, topic, &broker.Message{
Header: md,
Body: body,
}, broker.PublishContext(options.Context))
},
broker.PublishContext(options.Context),
broker.PublishBodyOnly(options.BodyOnly),
)
}