Send Dynamic gRPC messages without defining the message structure in proto

34 views
Skip to first unread message

Vasantha Kumar

unread,
Sep 13, 2021, 12:39:16 AM9/13/21
to grpc.io
Hi All! 

How can we send a Dynamic gRPC message without defining the model of message in proto?


Say, for example,  I want to send an int data type server to a client - But I don't want to define the Message with int property within it. I wanted to serialise Int data to binary format from Business Logic and write directly to the gRPC stream. 

Please let me know if you have inputs related to the same.
Thanks in Advance. 

sanjay...@google.com

unread,
Sep 15, 2021, 1:15:54 PM9/15/21
to grpc.io
Which language do you want to do this in? 

Jeff Steger

unread,
Sep 19, 2021, 10:56:46 PM9/19/21
to sanjay...@google.com, grpc.io

I think what you are basically asking for is a ‘blob’, or just raw binary that your app can parse as it sees fit. If so, than one ‘bytes’ field in a protobuf message is what you are looking for. Your app can parse the raw binary however it sees fit.


--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/6d35fecb-96f0-442f-9295-26309adf9d44n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages