2021-01-19 19:41:39 +03:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package service;
|
2021-03-22 08:42:38 +03:00
|
|
|
option go_package="github.com/unistack-org/micro-broker-service/v3/proto;service";
|
2021-01-19 19:41:39 +03:00
|
|
|
|
|
|
|
service Broker {
|
|
|
|
rpc Publish(PublishRequest) returns (Empty) {};
|
|
|
|
rpc Subscribe(SubscribeRequest) returns (stream Message) {};
|
|
|
|
}
|
|
|
|
|
|
|
|
message Empty {}
|
|
|
|
|
|
|
|
message PublishRequest {
|
|
|
|
string topic = 1;
|
|
|
|
Message message = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SubscribeRequest {
|
|
|
|
string topic = 1;
|
|
|
|
string group = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Message {
|
|
|
|
map<string,string> header = 1;
|
|
|
|
bytes body = 2;
|
|
|
|
}
|