1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
| 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;
| kMsgTypeQueryTopic = 6;
| kMsgTypeQueryTopicReply = 7;
| }
|
| message DataPub {
| bytes topic = 1;
| bytes data = 2;
| }
|
| message DataSub {
| repeated bytes topics = 1;
| }
|
| message DataRequest {
| bytes topic = 1;
| bytes data = 2;
| }
|
| message DataReply {
| bytes data = 1;
| }
|
| message DataQueryTopic {
| bytes topic = 1;
| }
|
| message DataQueryTopicReply {
| BHAddress address = 1;
| }
|
|