Message-Type in gRPC Requests/Responses

67 views
Skip to first unread message

Martin G

unread,
Mar 22, 2017, 4:15:58 PM3/22/17
to grpc.io
Hello,

According to the wire specification (http://www.grpc.io/docs/guides/wire.html) the request can carry an optional Message-Type in the headers which indicates the fully qualified proto name
of the message in the payload. I am using grpc-java and it doesn't seem to send this header. Is there a way to enable it? Also, is it intentional that the response can't carry this header? 
I think it would be useful for debugging purposes when the response could also carry this header.

Regards

Eric Anderson

unread,
Mar 22, 2017, 6:44:16 PM3/22/17
to Martin G, grpc.io
I don't think any implementation is providing that header at this point. That would also explain why it isn't defined for responses.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/d8b35ca3-ee1a-4c92-aae1-c80d881ed184%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Carl Mastrangelo

unread,
Mar 28, 2017, 6:54:23 PM3/28/17
to grpc.io
FWIW, the response can only really include the header in the beginning (i.e. Server Headers) and not the end (i.e. trailers).  If you want to open an issue on Github it can be prioritized.  That said, I don't know of any use cases for it.  Most clients/servers either know the type of response to expect, or  don't care and treat them as opaque bytes.

Martin G

unread,
Oct 21, 2017, 6:18:15 AM10/21/17
to grpc.io
Hello,
I created an issue on GitHub (https://github.com/grpc/grpc/issues/12468). A particular use case would be a gRPC Wireshark Dissector which could use this header to determine the contained Protocol Buffers message type and decode it using its schema definition.
Reply all
Reply to author
Forward
0 new messages