-
Notifications
You must be signed in to change notification settings - Fork 3
/
sample_publisher.proto
43 lines (36 loc) · 1.5 KB
/
sample_publisher.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
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Sample Publisher Service definition
//
// Sample prototype definitions for a Publisher providing subscription
// information to a Subscriber.
syntax = "proto3";
package sample_publisher;
// Sample publisher proto definition that allows a subscriber to get the
// necessary subscription information for a given subject.
service SamplePublisher {
// Method used by a subscriber to get topic and messaging broker
// information.
rpc GetSubscriptionInfo (SubscriptionInfoRequest) returns (SubscriptionInfoResponse);
}
// Representation of a request to get subscrption information about a specific
// subject from a publisher.
message SubscriptionInfoRequest {
// A field describing the topic or data a subscriber is interested in.
// An example subject: "GPS"
string subject = 1;
}
// Object returned by `GetSubscriptionInfo` containing necessary context for
// subscribing to information provided by a publisher.
message SubscriptionInfoResponse {
// Protocol used for subscription messages.
// An example protocol: "mqtt"
string protocolKind = 1;
// URI that a subscriber will connect to for a subscription.
string subscriptionUri = 2;
// In addition to providing the topic to connect to, this can in the future
// can provide other information for how to connect to a topic in the
// broker, like a connection token, etc.
string subscriptionMetadata = 3;
}