29 lines
378 B
Protocol Buffer
29 lines
378 B
Protocol Buffer
|
syntax = "proto3";
|
||
|
package pubsub;
|
||
|
|
||
|
service PubSub {
|
||
|
|
||
|
rpc Publish(PublishMessage) returns (PublishResponse) {}
|
||
|
|
||
|
rpc Consume(Consumer) returns (Message) {}
|
||
|
|
||
|
}
|
||
|
|
||
|
message PublishResponse {
|
||
|
}
|
||
|
|
||
|
message Consumer {
|
||
|
string topic = 1;
|
||
|
uint64 timeout_ms = 2;
|
||
|
}
|
||
|
|
||
|
message PublishMessage {
|
||
|
string topic = 1;
|
||
|
string message = 2;
|
||
|
}
|
||
|
|
||
|
message Message {
|
||
|
string message = 1;
|
||
|
}
|
||
|
|