grpc message should be able to set

This commit is contained in:
johnson 2019-06-18 17:07:31 +08:00 committed by Vasiliy Tolstov
parent 76265b618b
commit 869c6ec764

View File

@ -291,7 +291,7 @@ func (g *grpcClient) Options() client.Options {
} }
func (g *grpcClient) NewMessage(topic string, msg interface{}, opts ...client.MessageOption) client.Message { func (g *grpcClient) NewMessage(topic string, msg interface{}, opts ...client.MessageOption) client.Message {
return newGRPCPublication(topic, msg, "application/octet-stream") return newGRPCPublication(topic, msg, g.opts.ContentType, opts...)
} }
func (g *grpcClient) NewRequest(service, method string, req interface{}, reqOpts ...client.RequestOption) client.Request { func (g *grpcClient) NewRequest(service, method string, req interface{}, reqOpts ...client.RequestOption) client.Request {