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

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{ return n.opts.Broker.Publish(ctx, topic, &broker.Message{
Header: md, Header: md,
Body: body, Body: body,
}, broker.PublishContext(options.Context)) },
broker.PublishContext(options.Context),
broker.PublishBodyOnly(options.BodyOnly),
)
} }