micro-broker-service/proto/broker.proto

27 lines
467 B
Protocol Buffer
Raw Permalink Normal View History

syntax = "proto3";
package service;
option go_package="github.com/unistack-org/micro-broker-service;service";
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;
}