lichao
2021-04-02 dc12826dd61ce18fac3a9561c5843d30a0cf9660
proto/source/bhome_msg.proto
@@ -4,13 +4,31 @@
package bhome.msg;
// message format : header(BHMsgHead) + body(variable types)
message BHAddress {
   bytes mq_id = 1; // mqid, uuid
   bytes ip = 2;   //
   int32 port = 3;
}
message BHMsg {
message ProcInfo
{
   bytes id = 1;
   bytes name = 2;
   bytes public_info = 3;
   bytes private_info = 4;
}
message BHMsgHead {
   bytes msg_id = 1;
   repeated BHAddress route = 2; // for reply and proxy.
   int64 timestamp = 3;
   int32 type = 4;
   ProcInfo proc = 5;
   bytes topic = 6; // for request route
}
message BHMsg { // deprecated
   bytes msg_id = 1;
   int64 timestamp = 2;
   int32 type = 3;
@@ -50,12 +68,6 @@
   bytes data = 1; 
}
message ProcInfo
{
   bytes name = 1;
   bytes info = 2;
}
message DataProcRegister
{
   ProcInfo proc = 1;
@@ -74,3 +86,7 @@
message DataProcQueryTopicReply {
   BHAddress address = 1;
}
service TopicRequestReplyService {
   rpc Request (DataRequest) returns (DataReply);
}