forked from eclipse-chariott/Agemo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpubsub.proto
58 lines (46 loc) · 1.93 KB
/
pubsub.proto
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
57
58
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Pub Sub Service definition
//
// The prototype definitions for the Pub Sub Service.
syntax = "proto3";
package pubsub;
// The service entry point to the Pub Sub Service. Provides the ability to
// dynamically create and manage topics.
service PubSub {
// Method used to create a dynamically generated topic for a publisher.
rpc CreateTopic (CreateTopicRequest) returns (CreateTopicResponse);
// Method used to delete a dynamically generated topic for a publisher.
rpc DeleteTopic (DeleteTopicRequest) returns (DeleteTopicResponse);
}
// Representation of a request used to create a dynamically generated topic.
message CreateTopicRequest {
// An id of the publisher used to identify all topics a publisher creates.
string publisher_id = 1;
// Callback uri for a publisher, used to communicate updates from the
// Pub Sub Service.
string managementCallback = 2;
// The protocol used to communicate over the management callback.
// (Currently expects the protocol to be gRPC).
string managementProtocol = 3;
}
// Object returned from `CreateTopic` that provides messaging broker context
// and the dynamically generated topic. Publisher is expected to provide this
// information to any interested subscribers.
message CreateTopicResponse {
// The newly created topic name.
string generatedTopic = 1;
// URI of the messaging broker used to provide pub/sub functionality.
string brokerUri = 2;
// Communication protocol used by the messaging broker.
// An example protocol: "mqtt"
string brokerProtocol = 3;
}
// Representation of a request used to delete a topic for a publisher.
message DeleteTopicRequest {
// The name of the dynamically generated topic.
string topic = 1;
}
// Empty object indicating a successfull call of `DeleteTopic`.
message DeleteTopicResponse { }