syntax = "proto3"; option optimize_for = LITE_RUNTIME; package bhome.msg; message BHAddress { bytes mq_id = 1; // mqid, uuid bytes ip = 2; // int32 port = 3; } message BHMsg { bytes msg_id = 1; int64 timestamp = 2; int32 type = 3; repeated BHAddress route = 4; // for reply and proxy. bytes body = 5; } enum MsgType { kMsgTypeInvalid = 0; kMsgTypeRequest = 1; kMsgTypeReply = 2; kMsgTypePublish = 3; kMsgTypeSubscribe = 4; kMsgTypeUnsubscribe = 5; } message DataPub { bytes topic = 1; bytes data = 2; } message DataSub { repeated bytes topics = 1; }