pulsar-ruby 0.1.0.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +204 -0
- data/README.md +198 -0
- data/lib/pulsar/client.rb +136 -0
- data/lib/pulsar/consumer.rb +47 -0
- data/lib/pulsar/errors.rb +18 -0
- data/lib/pulsar/internal/bounded_queue.rb +78 -0
- data/lib/pulsar/internal/broker_error_mapper.rb +23 -0
- data/lib/pulsar/internal/command_factory.rb +118 -0
- data/lib/pulsar/internal/connection.rb +287 -0
- data/lib/pulsar/internal/consumer_impl.rb +130 -0
- data/lib/pulsar/internal/frame_codec.rb +62 -0
- data/lib/pulsar/internal/lookup_service.rb +28 -0
- data/lib/pulsar/internal/producer_impl.rb +146 -0
- data/lib/pulsar/internal/promise.rb +53 -0
- data/lib/pulsar/internal/tcp_transport.rb +76 -0
- data/lib/pulsar/internal/thread_runtime.rb +54 -0
- data/lib/pulsar/internal.rb +7 -0
- data/lib/pulsar/message.rb +21 -0
- data/lib/pulsar/message_id.rb +43 -0
- data/lib/pulsar/producer.rb +39 -0
- data/lib/pulsar/proto/PulsarApi_pb.rb +1002 -0
- data/lib/pulsar/proto/pulsar_api_pb.rb +3 -0
- data/lib/pulsar/version.rb +5 -0
- data/lib/pulsar.rb +26 -0
- data/proto/PulsarApi.proto +1360 -0
- metadata +84 -0
|
@@ -0,0 +1,1360 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
syntax = "proto2";
|
|
20
|
+
|
|
21
|
+
package pulsar.proto;
|
|
22
|
+
option java_package = "org.apache.pulsar.common.api.proto";
|
|
23
|
+
option optimize_for = LITE_RUNTIME;
|
|
24
|
+
|
|
25
|
+
message Schema {
|
|
26
|
+
enum Type {
|
|
27
|
+
None = 0;
|
|
28
|
+
String = 1;
|
|
29
|
+
Json = 2;
|
|
30
|
+
Protobuf = 3;
|
|
31
|
+
Avro = 4;
|
|
32
|
+
Bool = 5;
|
|
33
|
+
Int8 = 6;
|
|
34
|
+
Int16 = 7;
|
|
35
|
+
Int32 = 8;
|
|
36
|
+
Int64 = 9;
|
|
37
|
+
Float = 10;
|
|
38
|
+
Double = 11;
|
|
39
|
+
Date = 12;
|
|
40
|
+
Time = 13;
|
|
41
|
+
Timestamp = 14;
|
|
42
|
+
KeyValue = 15;
|
|
43
|
+
Instant = 16;
|
|
44
|
+
LocalDate = 17;
|
|
45
|
+
LocalTime = 18;
|
|
46
|
+
LocalDateTime = 19;
|
|
47
|
+
ProtobufNative = 20;
|
|
48
|
+
AutoConsume = 21;
|
|
49
|
+
External = 22;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
required string name = 1;
|
|
53
|
+
required bytes schema_data = 3;
|
|
54
|
+
required Type type = 4;
|
|
55
|
+
repeated KeyValue properties = 5;
|
|
56
|
+
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message MessageIdData {
|
|
60
|
+
required uint64 ledgerId = 1;
|
|
61
|
+
required uint64 entryId = 2;
|
|
62
|
+
optional int32 partition = 3 [default = -1];
|
|
63
|
+
optional int32 batch_index = 4 [default = -1];
|
|
64
|
+
repeated int64 ack_set = 5;
|
|
65
|
+
optional int32 batch_size = 6;
|
|
66
|
+
|
|
67
|
+
// For the chunk message id, we need to specify the first chunk message id.
|
|
68
|
+
optional MessageIdData first_chunk_message_id = 7;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message KeyValue {
|
|
72
|
+
required string key = 1;
|
|
73
|
+
required string value = 2;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
message KeyLongValue {
|
|
77
|
+
required string key = 1;
|
|
78
|
+
required uint64 value = 2;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
message IntRange {
|
|
82
|
+
required int32 start = 1;
|
|
83
|
+
required int32 end = 2;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message EncryptionKeys {
|
|
87
|
+
required string key = 1;
|
|
88
|
+
required bytes value = 2;
|
|
89
|
+
repeated KeyValue metadata = 3;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
enum CompressionType {
|
|
93
|
+
NONE = 0;
|
|
94
|
+
LZ4 = 1;
|
|
95
|
+
ZLIB = 2;
|
|
96
|
+
ZSTD = 3;
|
|
97
|
+
SNAPPY = 4;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
enum ProducerAccessMode {
|
|
101
|
+
Shared = 0; // By default multiple producers can publish on a topic
|
|
102
|
+
Exclusive = 1; // Require exclusive access for producer. Fail immediately if there's already a producer connected.
|
|
103
|
+
WaitForExclusive = 2; // Producer creation is pending until it can acquire exclusive access
|
|
104
|
+
ExclusiveWithFencing = 3; // Require exclusive access for producer. Fence out old producer.
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
message MessageMetadata {
|
|
108
|
+
required string producer_name = 1;
|
|
109
|
+
required uint64 sequence_id = 2;
|
|
110
|
+
required uint64 publish_time = 3;
|
|
111
|
+
repeated KeyValue properties = 4;
|
|
112
|
+
|
|
113
|
+
// Property set on replicated message,
|
|
114
|
+
// includes the source cluster name
|
|
115
|
+
optional string replicated_from = 5;
|
|
116
|
+
//key to decide partition for the msg
|
|
117
|
+
optional string partition_key = 6;
|
|
118
|
+
// Override namespace's replication
|
|
119
|
+
repeated string replicate_to = 7;
|
|
120
|
+
optional CompressionType compression = 8 [default = NONE];
|
|
121
|
+
optional uint32 uncompressed_size = 9 [default = 0];
|
|
122
|
+
// Removed below checksum field from Metadata as
|
|
123
|
+
// it should be part of send-command which keeps checksum of header + payload
|
|
124
|
+
//optional sfixed64 checksum = 10;
|
|
125
|
+
// differentiate single and batch message metadata
|
|
126
|
+
optional int32 num_messages_in_batch = 11 [default = 1];
|
|
127
|
+
|
|
128
|
+
// the timestamp that this event occurs. it is typically set by applications.
|
|
129
|
+
// if this field is omitted, `publish_time` can be used for the purpose of `event_time`.
|
|
130
|
+
optional uint64 event_time = 12 [default = 0];
|
|
131
|
+
// Contains encryption key name, encrypted key and metadata to describe the key
|
|
132
|
+
repeated EncryptionKeys encryption_keys = 13;
|
|
133
|
+
// Algorithm used to encrypt data key
|
|
134
|
+
optional string encryption_algo = 14;
|
|
135
|
+
// Additional parameters required by encryption
|
|
136
|
+
optional bytes encryption_param = 15;
|
|
137
|
+
optional bytes schema_version = 16;
|
|
138
|
+
|
|
139
|
+
optional bool partition_key_b64_encoded = 17 [ default = false ];
|
|
140
|
+
// Specific a key to overwrite the message key which used for ordering dispatch in Key_Shared mode.
|
|
141
|
+
optional bytes ordering_key = 18;
|
|
142
|
+
|
|
143
|
+
// Mark the message to be delivered at or after the specified timestamp
|
|
144
|
+
optional int64 deliver_at_time = 19;
|
|
145
|
+
|
|
146
|
+
// Identify whether a message is a "marker" message used for
|
|
147
|
+
// internal metadata instead of application published data.
|
|
148
|
+
// Markers will generally not be propagated back to clients
|
|
149
|
+
optional int32 marker_type = 20;
|
|
150
|
+
|
|
151
|
+
// transaction related message info
|
|
152
|
+
optional uint64 txnid_least_bits = 22;
|
|
153
|
+
optional uint64 txnid_most_bits = 23;
|
|
154
|
+
|
|
155
|
+
/// Add highest sequence id to support batch message with external sequence id
|
|
156
|
+
optional uint64 highest_sequence_id = 24 [default = 0];
|
|
157
|
+
|
|
158
|
+
// Indicate if the message payload value is set
|
|
159
|
+
optional bool null_value = 25 [default = false];
|
|
160
|
+
optional string uuid = 26;
|
|
161
|
+
optional int32 num_chunks_from_msg = 27;
|
|
162
|
+
optional int32 total_chunk_msg_size = 28;
|
|
163
|
+
optional int32 chunk_id = 29;
|
|
164
|
+
|
|
165
|
+
// Indicate if the message partition key is set
|
|
166
|
+
optional bool null_partition_key = 30 [default = false];
|
|
167
|
+
|
|
168
|
+
// Indicates the indexes of messages retained in the batch after compaction. When a batch is compacted,
|
|
169
|
+
// some messages may be removed (compacted out). For example, if the original batch contains:
|
|
170
|
+
// `k0 => v0, k1 => v1, k2 => v2, k1 => null`, the compacted batch will retain only `k0 => v0` and `k2 => v2`.
|
|
171
|
+
// In this case, this field will be set to `[0, 2]`, and the payload buffer will only include the retained messages.
|
|
172
|
+
//
|
|
173
|
+
// Note: Batches compacted by older versions of the compaction service do not include this field. For such batches,
|
|
174
|
+
// the `compacted_out` field in `SingleMessageMetadata` must be checked to identify and filter out compacted
|
|
175
|
+
// messages (e.g., `k1 => v1` and `k1 => null` in the example above).
|
|
176
|
+
repeated int32 compacted_batch_indexes = 31;
|
|
177
|
+
optional bytes schema_id = 32;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
message SingleMessageMetadata {
|
|
181
|
+
repeated KeyValue properties = 1;
|
|
182
|
+
optional string partition_key = 2;
|
|
183
|
+
required int32 payload_size = 3;
|
|
184
|
+
optional bool compacted_out = 4 [default = false];
|
|
185
|
+
|
|
186
|
+
// the timestamp that this event occurs. it is typically set by applications.
|
|
187
|
+
// if this field is omitted, `publish_time` can be used for the purpose of `event_time`.
|
|
188
|
+
optional uint64 event_time = 5 [default = 0];
|
|
189
|
+
optional bool partition_key_b64_encoded = 6 [ default = false ];
|
|
190
|
+
// Specific a key to overwrite the message key which used for ordering dispatch in Key_Shared mode.
|
|
191
|
+
optional bytes ordering_key = 7;
|
|
192
|
+
// Allows consumer retrieve the sequence id that the producer set.
|
|
193
|
+
optional uint64 sequence_id = 8;
|
|
194
|
+
// Indicate if the message payload value is set
|
|
195
|
+
optional bool null_value = 9 [ default = false ];
|
|
196
|
+
// Indicate if the message partition key is set
|
|
197
|
+
optional bool null_partition_key = 10 [ default = false];
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// metadata added for entry from broker
|
|
201
|
+
message BrokerEntryMetadata {
|
|
202
|
+
optional uint64 broker_timestamp = 1;
|
|
203
|
+
optional uint64 index = 2;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
enum ServerError {
|
|
207
|
+
UnknownError = 0;
|
|
208
|
+
MetadataError = 1; // Error with ZK/metadata
|
|
209
|
+
PersistenceError = 2; // Error writing reading from BK
|
|
210
|
+
AuthenticationError = 3; // Non valid authentication
|
|
211
|
+
AuthorizationError = 4; // Not authorized to use resource
|
|
212
|
+
|
|
213
|
+
ConsumerBusy = 5; // Unable to subscribe/unsubscribe because
|
|
214
|
+
// other consumers are connected
|
|
215
|
+
ServiceNotReady = 6; // Any error that requires client retry operation with a fresh lookup
|
|
216
|
+
ProducerBlockedQuotaExceededError = 7; // Unable to create producer because backlog quota exceeded
|
|
217
|
+
ProducerBlockedQuotaExceededException = 8; // Exception while creating producer because quota exceeded
|
|
218
|
+
ChecksumError = 9; // Error while verifying message checksum
|
|
219
|
+
UnsupportedVersionError = 10; // Error when an older client/version doesn't support a required feature
|
|
220
|
+
TopicNotFound = 11; // Topic not found
|
|
221
|
+
SubscriptionNotFound = 12; // Subscription not found
|
|
222
|
+
ConsumerNotFound = 13; // Consumer not found
|
|
223
|
+
TooManyRequests = 14; // Error with too many simultaneously request
|
|
224
|
+
TopicTerminatedError = 15; // The topic has been terminated
|
|
225
|
+
|
|
226
|
+
ProducerBusy = 16; // Producer with same name is already connected
|
|
227
|
+
InvalidTopicName = 17; // The topic name is not valid
|
|
228
|
+
|
|
229
|
+
IncompatibleSchema = 18; // Specified schema was incompatible with topic schema
|
|
230
|
+
ConsumerAssignError = 19; // Dispatcher assign consumer error
|
|
231
|
+
|
|
232
|
+
TransactionCoordinatorNotFound = 20; // Transaction coordinator not found error
|
|
233
|
+
InvalidTxnStatus = 21; // Invalid txn status error
|
|
234
|
+
NotAllowedError = 22; // Not allowed error
|
|
235
|
+
|
|
236
|
+
TransactionConflict = 23; // Ack with transaction conflict
|
|
237
|
+
TransactionNotFound = 24; // Transaction not found
|
|
238
|
+
|
|
239
|
+
ProducerFenced = 25; // When a producer asks and fail to get exclusive producer access,
|
|
240
|
+
// or loses the eclusive status after a reconnection, the broker will
|
|
241
|
+
// use this error to indicate that this producer is now permanently
|
|
242
|
+
// fenced. Applications are now supposed to close it and create a
|
|
243
|
+
// new producer
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
enum AuthMethod {
|
|
247
|
+
AuthMethodNone = 0;
|
|
248
|
+
AuthMethodYcaV1 = 1;
|
|
249
|
+
AuthMethodAthens = 2;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// Each protocol version identify new features that are
|
|
253
|
+
// incrementally added to the protocol
|
|
254
|
+
enum ProtocolVersion {
|
|
255
|
+
v0 = 0; // Initial versioning
|
|
256
|
+
v1 = 1; // Added application keep-alive
|
|
257
|
+
v2 = 2; // Added RedeliverUnacknowledgedMessages Command
|
|
258
|
+
v3 = 3; // Added compression with LZ4 and ZLib
|
|
259
|
+
v4 = 4; // Added batch message support
|
|
260
|
+
v5 = 5; // Added disconnect client w/o closing connection
|
|
261
|
+
v6 = 6; // Added checksum computation for metadata + payload
|
|
262
|
+
v7 = 7; // Added CommandLookupTopic - Binary Lookup
|
|
263
|
+
v8 = 8; // Added CommandConsumerStats - Client fetches broker side consumer stats
|
|
264
|
+
v9 = 9; // Added end of topic notification
|
|
265
|
+
v10 = 10;// Added proxy to broker
|
|
266
|
+
v11 = 11;// C++ consumers before this version are not correctly handling the checksum field
|
|
267
|
+
v12 = 12;// Added get topic's last messageId from broker
|
|
268
|
+
// Added CommandActiveConsumerChange
|
|
269
|
+
// Added CommandGetTopicsOfNamespace
|
|
270
|
+
v13 = 13; // Schema-registry : added avro schema format for json
|
|
271
|
+
v14 = 14; // Add CommandAuthChallenge and CommandAuthResponse for mutual auth
|
|
272
|
+
// Added Key_Shared subscription
|
|
273
|
+
v15 = 15; // Add CommandGetOrCreateSchema and CommandGetOrCreateSchemaResponse
|
|
274
|
+
v16 = 16; // Add support for broker entry metadata
|
|
275
|
+
v17 = 17; // Added support ack receipt
|
|
276
|
+
v18 = 18; // Add client support for broker entry metadata
|
|
277
|
+
v19 = 19; // Add CommandTcClientConnectRequest and CommandTcClientConnectResponse
|
|
278
|
+
v20 = 20; // Add client support for topic migration redirection CommandTopicMigrated
|
|
279
|
+
v21 = 21; // Carry the AUTO_CONSUME schema to the Broker after this version
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
message CommandConnect {
|
|
283
|
+
required string client_version = 1; // The version of the client. Proxy should forward client's client_version.
|
|
284
|
+
optional AuthMethod auth_method = 2; // Deprecated. Use "auth_method_name" instead.
|
|
285
|
+
optional string auth_method_name = 5;
|
|
286
|
+
optional bytes auth_data = 3;
|
|
287
|
+
optional int32 protocol_version = 4 [default = 0];
|
|
288
|
+
|
|
289
|
+
// Client can ask to be proxyied to a specific broker
|
|
290
|
+
// This is only honored by a Pulsar proxy
|
|
291
|
+
optional string proxy_to_broker_url = 6;
|
|
292
|
+
|
|
293
|
+
// Original principal that was verified by
|
|
294
|
+
// a Pulsar proxy. In this case the auth info above
|
|
295
|
+
// will be the auth of the proxy itself
|
|
296
|
+
optional string original_principal = 7;
|
|
297
|
+
|
|
298
|
+
// Original auth role and auth Method that was passed
|
|
299
|
+
// to the proxy. In this case the auth info above
|
|
300
|
+
// will be the auth of the proxy itself
|
|
301
|
+
optional string original_auth_data = 8;
|
|
302
|
+
optional string original_auth_method = 9;
|
|
303
|
+
|
|
304
|
+
// Feature flags
|
|
305
|
+
optional FeatureFlags feature_flags = 10;
|
|
306
|
+
|
|
307
|
+
optional string proxy_version = 11; // Version of the proxy. Should only be forwarded by a proxy.
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// Please also add a new enum for the class "PulsarClientException.FailedFeatureCheck" when adding a new feature flag.
|
|
311
|
+
message FeatureFlags {
|
|
312
|
+
optional bool supports_auth_refresh = 1 [default = false];
|
|
313
|
+
optional bool supports_broker_entry_metadata = 2 [default = false];
|
|
314
|
+
optional bool supports_partial_producer = 3 [default = false];
|
|
315
|
+
optional bool supports_topic_watchers = 4 [default = false];
|
|
316
|
+
optional bool supports_get_partitioned_metadata_without_auto_creation = 5 [default = false];
|
|
317
|
+
optional bool supports_repl_dedup_by_lid_and_eid = 6 [default = false];
|
|
318
|
+
optional bool supports_topic_watcher_reconcile = 7 [default = false];
|
|
319
|
+
optional bool supports_scalable_topics = 8 [default = false];
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
message CommandConnected {
|
|
323
|
+
required string server_version = 1;
|
|
324
|
+
optional int32 protocol_version = 2 [default = 0];
|
|
325
|
+
optional int32 max_message_size = 3;
|
|
326
|
+
optional FeatureFlags feature_flags = 4;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
message CommandAuthResponse {
|
|
330
|
+
optional string client_version = 1; // The version of the client. Proxy should forward client's client_version.
|
|
331
|
+
optional AuthData response = 2;
|
|
332
|
+
optional int32 protocol_version = 3 [default = 0];
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
message CommandAuthChallenge {
|
|
336
|
+
optional string server_version = 1;
|
|
337
|
+
optional AuthData challenge = 2;
|
|
338
|
+
optional int32 protocol_version = 3 [default = 0];
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// To support mutual authentication type, such as Sasl, reuse this command to mutual auth.
|
|
342
|
+
message AuthData {
|
|
343
|
+
optional string auth_method_name = 1;
|
|
344
|
+
optional bytes auth_data = 2;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
enum KeySharedMode {
|
|
348
|
+
AUTO_SPLIT = 0;
|
|
349
|
+
STICKY = 1;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
message KeySharedMeta {
|
|
353
|
+
required KeySharedMode keySharedMode = 1;
|
|
354
|
+
repeated IntRange hashRanges = 3;
|
|
355
|
+
optional bool allowOutOfOrderDelivery = 4 [default = false];
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
message CommandSubscribe {
|
|
359
|
+
enum SubType {
|
|
360
|
+
Exclusive = 0;
|
|
361
|
+
Shared = 1;
|
|
362
|
+
Failover = 2;
|
|
363
|
+
Key_Shared = 3;
|
|
364
|
+
}
|
|
365
|
+
required string topic = 1;
|
|
366
|
+
required string subscription = 2;
|
|
367
|
+
required SubType subType = 3;
|
|
368
|
+
|
|
369
|
+
required uint64 consumer_id = 4;
|
|
370
|
+
required uint64 request_id = 5;
|
|
371
|
+
optional string consumer_name = 6;
|
|
372
|
+
optional int32 priority_level = 7;
|
|
373
|
+
|
|
374
|
+
// Signal wether the subscription should be backed by a
|
|
375
|
+
// durable cursor or not
|
|
376
|
+
optional bool durable = 8 [default = true];
|
|
377
|
+
|
|
378
|
+
// If specified, the subscription will position the cursor
|
|
379
|
+
// markd-delete position on the particular message id and
|
|
380
|
+
// will send messages from that point
|
|
381
|
+
optional MessageIdData start_message_id = 9;
|
|
382
|
+
|
|
383
|
+
/// Add optional metadata key=value to this consumer
|
|
384
|
+
repeated KeyValue metadata = 10;
|
|
385
|
+
|
|
386
|
+
optional bool read_compacted = 11;
|
|
387
|
+
|
|
388
|
+
optional Schema schema = 12;
|
|
389
|
+
enum InitialPosition {
|
|
390
|
+
Latest = 0;
|
|
391
|
+
Earliest = 1;
|
|
392
|
+
}
|
|
393
|
+
// Signal whether the subscription will initialize on latest
|
|
394
|
+
// or not -- earliest
|
|
395
|
+
optional InitialPosition initialPosition = 13 [default = Latest];
|
|
396
|
+
|
|
397
|
+
// Mark the subscription as "replicated". Pulsar will make sure
|
|
398
|
+
// to periodically sync the state of replicated subscriptions
|
|
399
|
+
// across different clusters (when using geo-replication).
|
|
400
|
+
optional bool replicate_subscription_state = 14;
|
|
401
|
+
|
|
402
|
+
// If true, the subscribe operation will cause a topic to be
|
|
403
|
+
// created if it does not exist already (and if topic auto-creation
|
|
404
|
+
// is allowed by broker.
|
|
405
|
+
// If false, the subscribe operation will fail if the topic
|
|
406
|
+
// does not exist.
|
|
407
|
+
optional bool force_topic_creation = 15 [default = true];
|
|
408
|
+
|
|
409
|
+
// If specified, the subscription will reset cursor's position back
|
|
410
|
+
// to specified seconds and will send messages from that point
|
|
411
|
+
optional uint64 start_message_rollback_duration_sec = 16 [default = 0];
|
|
412
|
+
|
|
413
|
+
optional KeySharedMeta keySharedMeta = 17;
|
|
414
|
+
|
|
415
|
+
repeated KeyValue subscription_properties = 18;
|
|
416
|
+
|
|
417
|
+
// The consumer epoch, when exclusive and failover consumer redeliver unack message will increase the epoch
|
|
418
|
+
optional uint64 consumer_epoch = 19;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
message CommandPartitionedTopicMetadata {
|
|
422
|
+
required string topic = 1;
|
|
423
|
+
required uint64 request_id = 2;
|
|
424
|
+
// TODO - Remove original_principal, original_auth_data, original_auth_method
|
|
425
|
+
// Original principal that was verified by
|
|
426
|
+
// a Pulsar proxy.
|
|
427
|
+
optional string original_principal = 3;
|
|
428
|
+
|
|
429
|
+
// Original auth role and auth Method that was passed
|
|
430
|
+
// to the proxy.
|
|
431
|
+
optional string original_auth_data = 4;
|
|
432
|
+
optional string original_auth_method = 5;
|
|
433
|
+
optional bool metadata_auto_creation_enabled = 6 [default = true];
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
message CommandPartitionedTopicMetadataResponse {
|
|
437
|
+
enum LookupType {
|
|
438
|
+
Success = 0;
|
|
439
|
+
Failed = 1;
|
|
440
|
+
}
|
|
441
|
+
optional uint32 partitions = 1; // Optional in case of error
|
|
442
|
+
required uint64 request_id = 2;
|
|
443
|
+
optional LookupType response = 3;
|
|
444
|
+
optional ServerError error = 4;
|
|
445
|
+
optional string message = 5;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
message CommandLookupTopic {
|
|
449
|
+
required string topic = 1;
|
|
450
|
+
required uint64 request_id = 2;
|
|
451
|
+
optional bool authoritative = 3 [default = false];
|
|
452
|
+
|
|
453
|
+
// TODO - Remove original_principal, original_auth_data, original_auth_method
|
|
454
|
+
// Original principal that was verified by
|
|
455
|
+
// a Pulsar proxy.
|
|
456
|
+
optional string original_principal = 4;
|
|
457
|
+
|
|
458
|
+
// Original auth role and auth Method that was passed
|
|
459
|
+
// to the proxy.
|
|
460
|
+
optional string original_auth_data = 5;
|
|
461
|
+
optional string original_auth_method = 6;
|
|
462
|
+
//
|
|
463
|
+
optional string advertised_listener_name = 7;
|
|
464
|
+
// The properties used for topic lookup
|
|
465
|
+
repeated KeyValue properties = 8;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
message CommandLookupTopicResponse {
|
|
469
|
+
enum LookupType {
|
|
470
|
+
Redirect = 0;
|
|
471
|
+
Connect = 1;
|
|
472
|
+
Failed = 2;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
optional string brokerServiceUrl = 1; // Optional in case of error
|
|
476
|
+
optional string brokerServiceUrlTls = 2;
|
|
477
|
+
optional LookupType response = 3;
|
|
478
|
+
required uint64 request_id = 4;
|
|
479
|
+
optional bool authoritative = 5 [default = false];
|
|
480
|
+
optional ServerError error = 6;
|
|
481
|
+
optional string message = 7;
|
|
482
|
+
|
|
483
|
+
// If it's true, indicates to the client that it must
|
|
484
|
+
// always connect through the service url after the
|
|
485
|
+
// lookup has been completed.
|
|
486
|
+
optional bool proxy_through_service_url = 8 [default = false];
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/// Create a new Producer on a topic, assigning the given producer_id,
|
|
490
|
+
/// all messages sent with this producer_id will be persisted on the topic
|
|
491
|
+
message CommandProducer {
|
|
492
|
+
required string topic = 1;
|
|
493
|
+
required uint64 producer_id = 2;
|
|
494
|
+
required uint64 request_id = 3;
|
|
495
|
+
|
|
496
|
+
/// If a producer name is specified, the name will be used,
|
|
497
|
+
/// otherwise the broker will generate a unique name
|
|
498
|
+
optional string producer_name = 4;
|
|
499
|
+
|
|
500
|
+
optional bool encrypted = 5 [default = false];
|
|
501
|
+
|
|
502
|
+
/// Add optional metadata key=value to this producer
|
|
503
|
+
repeated KeyValue metadata = 6;
|
|
504
|
+
|
|
505
|
+
optional Schema schema = 7;
|
|
506
|
+
|
|
507
|
+
// If producer reconnect to broker, the epoch of this producer will +1
|
|
508
|
+
optional uint64 epoch = 8 [default = 0];
|
|
509
|
+
|
|
510
|
+
// Indicate the name of the producer is generated or user provided
|
|
511
|
+
// Use default true here is in order to be forward compatible with the client
|
|
512
|
+
optional bool user_provided_producer_name = 9 [default = true];
|
|
513
|
+
|
|
514
|
+
// Require that this producers will be the only producer allowed on the topic
|
|
515
|
+
optional ProducerAccessMode producer_access_mode = 10 [default = Shared];
|
|
516
|
+
|
|
517
|
+
// Topic epoch is used to fence off producers that reconnects after a new
|
|
518
|
+
// exclusive producer has already taken over. This id is assigned by the
|
|
519
|
+
// broker on the CommandProducerSuccess. The first time, the client will
|
|
520
|
+
// leave it empty and then it will always carry the same epoch number on
|
|
521
|
+
// the subsequent reconnections.
|
|
522
|
+
optional uint64 topic_epoch = 11;
|
|
523
|
+
|
|
524
|
+
optional bool txn_enabled = 12 [default = false];
|
|
525
|
+
|
|
526
|
+
// Name of the initial subscription of the topic.
|
|
527
|
+
// If this field is not set, the initial subscription will not be created.
|
|
528
|
+
// If this field is set but the broker's `allowAutoSubscriptionCreation`
|
|
529
|
+
// is disabled, the producer will fail to be created.
|
|
530
|
+
optional string initial_subscription_name = 13;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
message CommandSend {
|
|
534
|
+
required uint64 producer_id = 1;
|
|
535
|
+
required uint64 sequence_id = 2;
|
|
536
|
+
optional int32 num_messages = 3 [default = 1];
|
|
537
|
+
optional uint64 txnid_least_bits = 4 [default = 0];
|
|
538
|
+
optional uint64 txnid_most_bits = 5 [default = 0];
|
|
539
|
+
|
|
540
|
+
/// Add highest sequence id to support batch message with external sequence id
|
|
541
|
+
optional uint64 highest_sequence_id = 6 [default = 0];
|
|
542
|
+
optional bool is_chunk =7 [default = false];
|
|
543
|
+
|
|
544
|
+
// Specify if the message being published is a Pulsar marker or not
|
|
545
|
+
optional bool marker = 8 [default = false];
|
|
546
|
+
|
|
547
|
+
// Message id of this message, currently is used in replicator for shadow topic.
|
|
548
|
+
optional MessageIdData message_id = 9;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
message CommandSendReceipt {
|
|
552
|
+
required uint64 producer_id = 1;
|
|
553
|
+
required uint64 sequence_id = 2;
|
|
554
|
+
optional MessageIdData message_id = 3;
|
|
555
|
+
optional uint64 highest_sequence_id = 4 [default = 0];
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
message CommandSendError {
|
|
559
|
+
required uint64 producer_id = 1;
|
|
560
|
+
required uint64 sequence_id = 2;
|
|
561
|
+
required ServerError error = 3;
|
|
562
|
+
required string message = 4;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
message CommandMessage {
|
|
566
|
+
required uint64 consumer_id = 1;
|
|
567
|
+
required MessageIdData message_id = 2;
|
|
568
|
+
optional uint32 redelivery_count = 3 [default = 0];
|
|
569
|
+
repeated int64 ack_set = 4;
|
|
570
|
+
optional uint64 consumer_epoch = 5;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
message CommandAck {
|
|
574
|
+
enum AckType {
|
|
575
|
+
Individual = 0;
|
|
576
|
+
Cumulative = 1;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
required uint64 consumer_id = 1;
|
|
580
|
+
required AckType ack_type = 2;
|
|
581
|
+
|
|
582
|
+
// In case of individual acks, the client can pass a list of message ids
|
|
583
|
+
repeated MessageIdData message_id = 3;
|
|
584
|
+
|
|
585
|
+
// Acks can contain a flag to indicate the consumer
|
|
586
|
+
// received an invalid message that got discarded
|
|
587
|
+
// before being passed on to the application.
|
|
588
|
+
enum ValidationError {
|
|
589
|
+
UncompressedSizeCorruption = 0;
|
|
590
|
+
DecompressionError = 1;
|
|
591
|
+
ChecksumMismatch = 2;
|
|
592
|
+
BatchDeSerializeError = 3;
|
|
593
|
+
DecryptionError = 4;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
optional ValidationError validation_error = 4;
|
|
597
|
+
repeated KeyLongValue properties = 5;
|
|
598
|
+
|
|
599
|
+
optional uint64 txnid_least_bits = 6 [default = 0];
|
|
600
|
+
optional uint64 txnid_most_bits = 7 [default = 0];
|
|
601
|
+
optional uint64 request_id = 8;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
message CommandAckResponse {
|
|
605
|
+
required uint64 consumer_id = 1;
|
|
606
|
+
optional uint64 txnid_least_bits = 2 [default = 0];
|
|
607
|
+
optional uint64 txnid_most_bits = 3 [default = 0];
|
|
608
|
+
optional ServerError error = 4;
|
|
609
|
+
optional string message = 5;
|
|
610
|
+
optional uint64 request_id = 6;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
// changes on active consumer
|
|
614
|
+
message CommandActiveConsumerChange {
|
|
615
|
+
required uint64 consumer_id = 1;
|
|
616
|
+
optional bool is_active = 2 [default = false];
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
message CommandFlow {
|
|
620
|
+
required uint64 consumer_id = 1;
|
|
621
|
+
|
|
622
|
+
// Max number of messages to prefetch, in addition
|
|
623
|
+
// of any number previously specified
|
|
624
|
+
required uint32 messagePermits = 2;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
message CommandUnsubscribe {
|
|
628
|
+
required uint64 consumer_id = 1;
|
|
629
|
+
required uint64 request_id = 2;
|
|
630
|
+
optional bool force = 3 [default = false];
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
// Reset an existing consumer to a particular message id
|
|
634
|
+
message CommandSeek {
|
|
635
|
+
required uint64 consumer_id = 1;
|
|
636
|
+
required uint64 request_id = 2;
|
|
637
|
+
|
|
638
|
+
optional MessageIdData message_id = 3;
|
|
639
|
+
optional uint64 message_publish_time = 4;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
// Message sent by broker to client when a topic
|
|
643
|
+
// has been forcefully terminated and there are no more
|
|
644
|
+
// messages left to consume
|
|
645
|
+
message CommandReachedEndOfTopic {
|
|
646
|
+
required uint64 consumer_id = 1;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
message CommandTopicMigrated {
|
|
650
|
+
enum ResourceType {
|
|
651
|
+
Producer = 0;
|
|
652
|
+
Consumer = 1;
|
|
653
|
+
}
|
|
654
|
+
required uint64 resource_id = 1;
|
|
655
|
+
required ResourceType resource_type = 2;
|
|
656
|
+
optional string brokerServiceUrl = 3;
|
|
657
|
+
optional string brokerServiceUrlTls = 4;
|
|
658
|
+
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
message CommandCloseProducer {
|
|
663
|
+
required uint64 producer_id = 1;
|
|
664
|
+
required uint64 request_id = 2;
|
|
665
|
+
optional string assignedBrokerServiceUrl = 3;
|
|
666
|
+
optional string assignedBrokerServiceUrlTls = 4;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
message CommandCloseConsumer {
|
|
670
|
+
required uint64 consumer_id = 1;
|
|
671
|
+
required uint64 request_id = 2;
|
|
672
|
+
optional string assignedBrokerServiceUrl = 3;
|
|
673
|
+
optional string assignedBrokerServiceUrlTls = 4;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
message CommandRedeliverUnacknowledgedMessages {
|
|
677
|
+
required uint64 consumer_id = 1;
|
|
678
|
+
repeated MessageIdData message_ids = 2;
|
|
679
|
+
optional uint64 consumer_epoch = 3;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
message CommandSuccess {
|
|
683
|
+
required uint64 request_id = 1;
|
|
684
|
+
optional Schema schema = 2;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
/// Response from CommandProducer
|
|
688
|
+
message CommandProducerSuccess {
|
|
689
|
+
required uint64 request_id = 1;
|
|
690
|
+
required string producer_name = 2;
|
|
691
|
+
|
|
692
|
+
// The last sequence id that was stored by this producer in the previous session
|
|
693
|
+
// This will only be meaningful if deduplication has been enabled.
|
|
694
|
+
optional int64 last_sequence_id = 3 [default = -1];
|
|
695
|
+
optional bytes schema_version = 4;
|
|
696
|
+
|
|
697
|
+
// The topic epoch assigned by the broker. This field will only be set if we
|
|
698
|
+
// were requiring exclusive access when creating the producer.
|
|
699
|
+
optional uint64 topic_epoch = 5;
|
|
700
|
+
|
|
701
|
+
// If producer is not "ready", the client will avoid to timeout the request
|
|
702
|
+
// for creating the producer. Instead it will wait indefinitely until it gets
|
|
703
|
+
// a subsequent `CommandProducerSuccess` with `producer_ready==true`.
|
|
704
|
+
optional bool producer_ready = 6 [default = true];
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
message CommandError {
|
|
708
|
+
required uint64 request_id = 1;
|
|
709
|
+
required ServerError error = 2;
|
|
710
|
+
required string message = 3;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
// Commands to probe the state of connection.
|
|
714
|
+
// When either client or broker doesn't receive commands for certain
|
|
715
|
+
// amount of time, they will send a Ping probe.
|
|
716
|
+
message CommandPing {
|
|
717
|
+
}
|
|
718
|
+
message CommandPong {
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
message CommandConsumerStats {
|
|
722
|
+
required uint64 request_id = 1;
|
|
723
|
+
// required string topic_name = 2;
|
|
724
|
+
// required string subscription_name = 3;
|
|
725
|
+
required uint64 consumer_id = 4;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
message CommandConsumerStatsResponse {
|
|
729
|
+
required uint64 request_id = 1;
|
|
730
|
+
optional ServerError error_code = 2;
|
|
731
|
+
optional string error_message = 3;
|
|
732
|
+
|
|
733
|
+
/// Total rate of messages delivered to the consumer. msg/s
|
|
734
|
+
optional double msgRateOut = 4;
|
|
735
|
+
|
|
736
|
+
/// Total throughput delivered to the consumer. bytes/s
|
|
737
|
+
optional double msgThroughputOut = 5;
|
|
738
|
+
|
|
739
|
+
/// Total rate of messages redelivered by this consumer. msg/s
|
|
740
|
+
optional double msgRateRedeliver = 6;
|
|
741
|
+
|
|
742
|
+
/// Name of the consumer
|
|
743
|
+
optional string consumerName = 7;
|
|
744
|
+
|
|
745
|
+
/// Number of available message permits for the consumer
|
|
746
|
+
optional uint64 availablePermits = 8;
|
|
747
|
+
|
|
748
|
+
/// Number of unacknowledged messages for the consumer
|
|
749
|
+
optional uint64 unackedMessages = 9;
|
|
750
|
+
|
|
751
|
+
/// Flag to verify if consumer is blocked due to reaching threshold of unacked messages
|
|
752
|
+
optional bool blockedConsumerOnUnackedMsgs = 10;
|
|
753
|
+
|
|
754
|
+
/// Address of this consumer
|
|
755
|
+
optional string address = 11;
|
|
756
|
+
|
|
757
|
+
/// Timestamp of connection
|
|
758
|
+
optional string connectedSince = 12;
|
|
759
|
+
|
|
760
|
+
/// Whether this subscription is Exclusive or Shared or Failover
|
|
761
|
+
optional string type = 13;
|
|
762
|
+
|
|
763
|
+
/// Total rate of messages expired on this subscription. msg/s
|
|
764
|
+
optional double msgRateExpired = 14;
|
|
765
|
+
|
|
766
|
+
/// Number of messages in the subscription backlog
|
|
767
|
+
optional uint64 msgBacklog = 15;
|
|
768
|
+
|
|
769
|
+
/// Total rate of messages ack. msg/s
|
|
770
|
+
optional double messageAckRate = 16;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
message CommandGetLastMessageId {
|
|
774
|
+
required uint64 consumer_id = 1;
|
|
775
|
+
required uint64 request_id = 2;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
message CommandGetLastMessageIdResponse {
|
|
779
|
+
required MessageIdData last_message_id = 1;
|
|
780
|
+
required uint64 request_id = 2;
|
|
781
|
+
optional MessageIdData consumer_mark_delete_position = 3;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
message CommandGetTopicsOfNamespace {
|
|
785
|
+
enum Mode {
|
|
786
|
+
PERSISTENT = 0;
|
|
787
|
+
NON_PERSISTENT = 1;
|
|
788
|
+
ALL = 2;
|
|
789
|
+
}
|
|
790
|
+
required uint64 request_id = 1;
|
|
791
|
+
required string namespace = 2;
|
|
792
|
+
optional Mode mode = 3 [default = PERSISTENT];
|
|
793
|
+
optional string topics_pattern = 4;
|
|
794
|
+
optional string topics_hash = 5;
|
|
795
|
+
// Context properties from the client
|
|
796
|
+
repeated KeyValue properties = 6;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
message CommandGetTopicsOfNamespaceResponse {
|
|
800
|
+
required uint64 request_id = 1;
|
|
801
|
+
repeated string topics = 2;
|
|
802
|
+
// true iff the topic list was filtered by the pattern supplied by the client
|
|
803
|
+
optional bool filtered = 3 [default = false];
|
|
804
|
+
// hash computed from the names of matching topics
|
|
805
|
+
optional string topics_hash = 4;
|
|
806
|
+
// if false, topics is empty and the list of matching topics has not changed
|
|
807
|
+
optional bool changed = 5 [default = true];
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
message CommandWatchTopicList {
|
|
811
|
+
required uint64 request_id = 1;
|
|
812
|
+
required uint64 watcher_id = 2;
|
|
813
|
+
required string namespace = 3;
|
|
814
|
+
required string topics_pattern = 4;
|
|
815
|
+
// Only present when the client reconnects:
|
|
816
|
+
optional string topics_hash = 5;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
message CommandWatchTopicListSuccess {
|
|
820
|
+
required uint64 request_id = 1;
|
|
821
|
+
required uint64 watcher_id = 2;
|
|
822
|
+
repeated string topic = 3;
|
|
823
|
+
required string topics_hash = 4;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
message CommandWatchTopicUpdate {
|
|
827
|
+
required uint64 watcher_id = 1;
|
|
828
|
+
repeated string new_topics = 2;
|
|
829
|
+
repeated string deleted_topics = 3;
|
|
830
|
+
required string topics_hash = 4;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
message CommandWatchTopicListClose {
|
|
834
|
+
required uint64 request_id = 1;
|
|
835
|
+
required uint64 watcher_id = 2;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
/// --- Scalable topic commands ---
|
|
839
|
+
|
|
840
|
+
enum SegmentState {
|
|
841
|
+
ACTIVE = 0;
|
|
842
|
+
SEALED = 1;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
message SegmentInfoProto {
|
|
846
|
+
required uint64 segment_id = 1;
|
|
847
|
+
required uint32 hash_start = 2;
|
|
848
|
+
required uint32 hash_end = 3;
|
|
849
|
+
required SegmentState state = 4;
|
|
850
|
+
repeated uint64 parent_ids = 5;
|
|
851
|
+
repeated uint64 child_ids = 6;
|
|
852
|
+
required uint64 created_at_epoch = 7;
|
|
853
|
+
optional uint64 sealed_at_epoch = 8;
|
|
854
|
+
// Wall-clock millis at create / seal time. Used for retention-based segment GC
|
|
855
|
+
// and timestamp-based seek; epoch above is a DAG generation number, not a clock.
|
|
856
|
+
required uint64 created_at_ms = 9;
|
|
857
|
+
optional uint64 sealed_at_ms = 10;
|
|
858
|
+
|
|
859
|
+
// Legacy-segment marker. When set, this segment is not managed by the scalable-topic
|
|
860
|
+
// controller and has no segment://... topic of its own — it wraps the named, externally
|
|
861
|
+
// managed persistent://... topic instead. Used by the synthetic-layout response the
|
|
862
|
+
// broker returns for a regular (partitioned or non-partitioned) topic that has not yet
|
|
863
|
+
// been migrated to a scalable topic. When absent, the segment URI is computed normally
|
|
864
|
+
// from the scalable topic name and segment_id (segment://<topic>/<descriptor>).
|
|
865
|
+
optional string legacy_topic_name = 11;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
message SegmentBrokerAddress {
|
|
869
|
+
required uint64 segment_id = 1;
|
|
870
|
+
required string broker_url = 2;
|
|
871
|
+
optional string broker_url_tls = 3;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
message ScalableTopicDAG {
|
|
875
|
+
required uint64 epoch = 1;
|
|
876
|
+
repeated SegmentInfoProto segments = 2;
|
|
877
|
+
repeated SegmentBrokerAddress segment_brokers = 3;
|
|
878
|
+
optional string controller_broker_url = 4;
|
|
879
|
+
optional string controller_broker_url_tls = 5;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
// Client -> Broker: Request scalable topic metadata and initiate watch session
|
|
883
|
+
message CommandScalableTopicLookup {
|
|
884
|
+
required uint64 session_id = 1; // Client-assigned session ID
|
|
885
|
+
// Any of "topic://t/n/x", "persistent://t/n/x", or a short form like
|
|
886
|
+
// "my-topic" (normalized by the broker to persistent://public/default/my-topic).
|
|
887
|
+
// The broker resolves the input to the canonical topic://... identity and
|
|
888
|
+
// returns it in CommandScalableTopicUpdate.resolved_topic_name.
|
|
889
|
+
required string topic = 2;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
// Broker -> Client: Used for BOTH initial response and subsequent pushed updates
|
|
893
|
+
message CommandScalableTopicUpdate {
|
|
894
|
+
required uint64 session_id = 1;
|
|
895
|
+
optional ScalableTopicDAG dag = 2;
|
|
896
|
+
|
|
897
|
+
optional ServerError error = 3;
|
|
898
|
+
optional string message = 4;
|
|
899
|
+
|
|
900
|
+
// Canonical scalable-topic identity (always "topic://t/n/x") that the client
|
|
901
|
+
// should use for downstream operations. Set on every success response,
|
|
902
|
+
// including for inputs that were given as persistent://... or short-form.
|
|
903
|
+
// Absent on error responses.
|
|
904
|
+
optional string resolved_topic_name = 5;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
// Client -> Broker: Close the DAG watch session
|
|
908
|
+
message CommandScalableTopicClose {
|
|
909
|
+
required uint64 session_id = 1;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
// Kind of scalable consumer registering with the controller leader.
|
|
913
|
+
// QueueConsumer never registers — it attaches directly to all active and sealed
|
|
914
|
+
// segment topics — so it does not appear here.
|
|
915
|
+
enum ScalableConsumerType {
|
|
916
|
+
STREAM = 0;
|
|
917
|
+
CHECKPOINT = 1;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
// A single segment assigned to a scalable consumer.
|
|
921
|
+
message ScalableAssignedSegment {
|
|
922
|
+
required uint64 segment_id = 1;
|
|
923
|
+
required uint32 hash_start = 2;
|
|
924
|
+
required uint32 hash_end = 3;
|
|
925
|
+
// Fully-qualified segment:// topic name the consumer should attach to.
|
|
926
|
+
required string segment_topic = 4;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
// An assignment of active segments to a single consumer. Carries the layout epoch
|
|
930
|
+
// it was computed from so the client can reject stale updates.
|
|
931
|
+
message ScalableConsumerAssignment {
|
|
932
|
+
required uint64 layout_epoch = 1;
|
|
933
|
+
repeated ScalableAssignedSegment segments = 2;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
// Client -> Broker: register as an ordered (Stream) or external (Checkpoint) consumer
|
|
937
|
+
// on a scalable topic and request the initial segment assignment. The broker leader
|
|
938
|
+
// persists the consumer registration and returns the current assignment.
|
|
939
|
+
message CommandScalableTopicSubscribe {
|
|
940
|
+
required uint64 request_id = 1;
|
|
941
|
+
required string topic = 2; // e.g. "topic://tenant/ns/my-topic"
|
|
942
|
+
required string subscription = 3;
|
|
943
|
+
required string consumer_name = 4;
|
|
944
|
+
required uint64 consumer_id = 5;
|
|
945
|
+
required ScalableConsumerType consumer_type = 6;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
// Broker -> Client: response to CommandScalableTopicSubscribe. On success, carries
|
|
949
|
+
// the initial ScalableConsumerAssignment. On failure, error + message are populated
|
|
950
|
+
// and the assignment is absent.
|
|
951
|
+
message CommandScalableTopicSubscribeResponse {
|
|
952
|
+
required uint64 request_id = 1;
|
|
953
|
+
optional ServerError error = 2;
|
|
954
|
+
optional string message = 3;
|
|
955
|
+
optional ScalableConsumerAssignment assignment = 4;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
// Broker -> Client: push a new assignment to a subscribed consumer after a rebalance
|
|
959
|
+
// (triggered by a peer joining/leaving the subscription or by a segment split/merge).
|
|
960
|
+
message CommandScalableTopicAssignmentUpdate {
|
|
961
|
+
required uint64 consumer_id = 1;
|
|
962
|
+
required ScalableConsumerAssignment assignment = 2;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
// Multi-topic consumer watcher: subscribes to the union of scalable topics in a
|
|
966
|
+
// namespace that match a (possibly empty) set of property filters. The broker keeps
|
|
967
|
+
// pushing updates as topics enter or leave the matching set. See
|
|
968
|
+
// `multi-topic-consumer-design.md` for the full design.
|
|
969
|
+
|
|
970
|
+
// Client -> Broker: open a watch session.
|
|
971
|
+
message CommandWatchScalableTopics {
|
|
972
|
+
required uint64 watch_id = 1; // Client-assigned watch ID
|
|
973
|
+
required string namespace = 2; // tenant/namespace
|
|
974
|
+
// Optional AND filters; empty list means "match all topics in the namespace".
|
|
975
|
+
repeated KeyValue property_filters = 3;
|
|
976
|
+
// Hash of the topics the client believes are currently in its set. Sent on
|
|
977
|
+
// reconnect; absent on first subscribe. If it matches the broker's freshly
|
|
978
|
+
// computed hash, the broker skips emitting the initial Snapshot — the client's
|
|
979
|
+
// local state is already correct and future Diffs will flow as usual. Same
|
|
980
|
+
// hash function as CommandGetTopicsOfNamespace (CRC32C over sorted topics).
|
|
981
|
+
optional string current_hash = 4;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
// Snapshot of the full matching set. Sent on initial subscribe and on every
|
|
985
|
+
// reconnect-resync. The client replaces its local set with this list.
|
|
986
|
+
message ScalableTopicsSnapshot {
|
|
987
|
+
repeated string topics = 1;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
// Incremental membership change. Apply removed before added when both are present.
|
|
991
|
+
message ScalableTopicsDiff {
|
|
992
|
+
repeated string added = 1;
|
|
993
|
+
repeated string removed = 2;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
// Broker -> Client: either Snapshot or Diff (mutually exclusive via oneof). When the
|
|
997
|
+
// initial subscribe fails, neither variant is set and `error`/`message` carry the
|
|
998
|
+
// failure reason.
|
|
999
|
+
message CommandWatchScalableTopicsUpdate {
|
|
1000
|
+
required uint64 watch_id = 1;
|
|
1001
|
+
|
|
1002
|
+
oneof event {
|
|
1003
|
+
ScalableTopicsSnapshot snapshot = 2;
|
|
1004
|
+
ScalableTopicsDiff diff = 3;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
optional ServerError error = 4;
|
|
1008
|
+
optional string message = 5;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
// Client -> Broker: close the watch session.
|
|
1012
|
+
message CommandWatchScalableTopicsClose {
|
|
1013
|
+
required uint64 watch_id = 1;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
message CommandGetSchema {
|
|
1017
|
+
required uint64 request_id = 1;
|
|
1018
|
+
required string topic = 2;
|
|
1019
|
+
|
|
1020
|
+
optional bytes schema_version = 3;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
message CommandGetSchemaResponse {
|
|
1024
|
+
required uint64 request_id = 1;
|
|
1025
|
+
optional ServerError error_code = 2;
|
|
1026
|
+
optional string error_message = 3;
|
|
1027
|
+
|
|
1028
|
+
optional Schema schema = 4;
|
|
1029
|
+
optional bytes schema_version = 5;
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
message CommandGetOrCreateSchema {
|
|
1033
|
+
required uint64 request_id = 1;
|
|
1034
|
+
required string topic = 2;
|
|
1035
|
+
required Schema schema = 3;
|
|
1036
|
+
optional string producerName = 4;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
message CommandGetOrCreateSchemaResponse {
|
|
1040
|
+
required uint64 request_id = 1;
|
|
1041
|
+
optional ServerError error_code = 2;
|
|
1042
|
+
optional string error_message = 3;
|
|
1043
|
+
|
|
1044
|
+
optional bytes schema_version = 4;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
/// --- transaction related ---
|
|
1048
|
+
|
|
1049
|
+
enum TxnAction {
|
|
1050
|
+
COMMIT = 0;
|
|
1051
|
+
ABORT = 1;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
message CommandTcClientConnectRequest {
|
|
1055
|
+
required uint64 request_id = 1;
|
|
1056
|
+
required uint64 tc_id = 2 [default = 0];
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
message CommandTcClientConnectResponse {
|
|
1060
|
+
required uint64 request_id = 1;
|
|
1061
|
+
optional ServerError error = 2;
|
|
1062
|
+
optional string message = 3;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
message CommandNewTxn {
|
|
1066
|
+
required uint64 request_id = 1;
|
|
1067
|
+
optional uint64 txn_ttl_seconds = 2 [default = 0];
|
|
1068
|
+
optional uint64 tc_id = 3 [default = 0];
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
message CommandNewTxnResponse {
|
|
1072
|
+
required uint64 request_id = 1;
|
|
1073
|
+
optional uint64 txnid_least_bits = 2 [default = 0];
|
|
1074
|
+
optional uint64 txnid_most_bits = 3 [default = 0];
|
|
1075
|
+
optional ServerError error = 4;
|
|
1076
|
+
optional string message = 5;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
message CommandAddPartitionToTxn {
|
|
1080
|
+
required uint64 request_id = 1;
|
|
1081
|
+
optional uint64 txnid_least_bits = 2 [default = 0];
|
|
1082
|
+
optional uint64 txnid_most_bits = 3 [default = 0];
|
|
1083
|
+
repeated string partitions = 4;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
message CommandAddPartitionToTxnResponse {
|
|
1087
|
+
required uint64 request_id = 1;
|
|
1088
|
+
optional uint64 txnid_least_bits = 2 [default = 0];
|
|
1089
|
+
optional uint64 txnid_most_bits = 3 [default = 0];
|
|
1090
|
+
optional ServerError error = 4;
|
|
1091
|
+
optional string message = 5;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
message Subscription {
|
|
1095
|
+
required string topic = 1;
|
|
1096
|
+
required string subscription = 2;
|
|
1097
|
+
}
|
|
1098
|
+
message CommandAddSubscriptionToTxn {
|
|
1099
|
+
required uint64 request_id = 1;
|
|
1100
|
+
optional uint64 txnid_least_bits = 2 [default = 0];
|
|
1101
|
+
optional uint64 txnid_most_bits = 3 [default = 0];
|
|
1102
|
+
repeated Subscription subscription = 4;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
message CommandAddSubscriptionToTxnResponse {
|
|
1106
|
+
required uint64 request_id = 1;
|
|
1107
|
+
optional uint64 txnid_least_bits = 2 [default = 0];
|
|
1108
|
+
optional uint64 txnid_most_bits = 3 [default = 0];
|
|
1109
|
+
optional ServerError error = 4;
|
|
1110
|
+
optional string message = 5;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
message CommandEndTxn {
|
|
1114
|
+
required uint64 request_id = 1;
|
|
1115
|
+
optional uint64 txnid_least_bits = 2 [default = 0];
|
|
1116
|
+
optional uint64 txnid_most_bits = 3 [default = 0];
|
|
1117
|
+
optional TxnAction txn_action = 4;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
message CommandEndTxnResponse {
|
|
1121
|
+
required uint64 request_id = 1;
|
|
1122
|
+
optional uint64 txnid_least_bits = 2 [default = 0];
|
|
1123
|
+
optional uint64 txnid_most_bits = 3 [default = 0];
|
|
1124
|
+
optional ServerError error = 4;
|
|
1125
|
+
optional string message = 5;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
message CommandEndTxnOnPartition {
|
|
1129
|
+
required uint64 request_id = 1;
|
|
1130
|
+
optional uint64 txnid_least_bits = 2 [default = 0];
|
|
1131
|
+
optional uint64 txnid_most_bits = 3 [default = 0];
|
|
1132
|
+
optional string topic = 4;
|
|
1133
|
+
optional TxnAction txn_action = 5;
|
|
1134
|
+
optional uint64 txnid_least_bits_of_low_watermark = 6;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
message CommandEndTxnOnPartitionResponse {
|
|
1138
|
+
required uint64 request_id = 1;
|
|
1139
|
+
optional uint64 txnid_least_bits = 2 [default = 0];
|
|
1140
|
+
optional uint64 txnid_most_bits = 3 [default = 0];
|
|
1141
|
+
optional ServerError error = 4;
|
|
1142
|
+
optional string message = 5;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
message CommandEndTxnOnSubscription {
|
|
1146
|
+
required uint64 request_id = 1;
|
|
1147
|
+
optional uint64 txnid_least_bits = 2 [default = 0];
|
|
1148
|
+
optional uint64 txnid_most_bits = 3 [default = 0];
|
|
1149
|
+
optional Subscription subscription= 4;
|
|
1150
|
+
optional TxnAction txn_action = 5;
|
|
1151
|
+
optional uint64 txnid_least_bits_of_low_watermark = 6;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
message CommandEndTxnOnSubscriptionResponse {
|
|
1155
|
+
required uint64 request_id = 1;
|
|
1156
|
+
optional uint64 txnid_least_bits = 2 [default = 0];
|
|
1157
|
+
optional uint64 txnid_most_bits = 3 [default = 0];
|
|
1158
|
+
optional ServerError error = 4;
|
|
1159
|
+
optional string message = 5;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
message BaseCommand {
|
|
1163
|
+
enum Type {
|
|
1164
|
+
CONNECT = 2;
|
|
1165
|
+
CONNECTED = 3;
|
|
1166
|
+
SUBSCRIBE = 4;
|
|
1167
|
+
|
|
1168
|
+
PRODUCER = 5;
|
|
1169
|
+
|
|
1170
|
+
SEND = 6;
|
|
1171
|
+
SEND_RECEIPT= 7;
|
|
1172
|
+
SEND_ERROR = 8;
|
|
1173
|
+
|
|
1174
|
+
MESSAGE = 9;
|
|
1175
|
+
ACK = 10;
|
|
1176
|
+
FLOW = 11;
|
|
1177
|
+
|
|
1178
|
+
UNSUBSCRIBE = 12;
|
|
1179
|
+
|
|
1180
|
+
SUCCESS = 13;
|
|
1181
|
+
ERROR = 14;
|
|
1182
|
+
|
|
1183
|
+
CLOSE_PRODUCER = 15;
|
|
1184
|
+
CLOSE_CONSUMER = 16;
|
|
1185
|
+
|
|
1186
|
+
PRODUCER_SUCCESS = 17;
|
|
1187
|
+
|
|
1188
|
+
PING = 18;
|
|
1189
|
+
PONG = 19;
|
|
1190
|
+
|
|
1191
|
+
REDELIVER_UNACKNOWLEDGED_MESSAGES = 20;
|
|
1192
|
+
|
|
1193
|
+
PARTITIONED_METADATA = 21;
|
|
1194
|
+
PARTITIONED_METADATA_RESPONSE = 22;
|
|
1195
|
+
|
|
1196
|
+
LOOKUP = 23;
|
|
1197
|
+
LOOKUP_RESPONSE = 24;
|
|
1198
|
+
|
|
1199
|
+
CONSUMER_STATS = 25;
|
|
1200
|
+
CONSUMER_STATS_RESPONSE = 26;
|
|
1201
|
+
|
|
1202
|
+
REACHED_END_OF_TOPIC = 27;
|
|
1203
|
+
|
|
1204
|
+
SEEK = 28;
|
|
1205
|
+
|
|
1206
|
+
GET_LAST_MESSAGE_ID = 29;
|
|
1207
|
+
GET_LAST_MESSAGE_ID_RESPONSE = 30;
|
|
1208
|
+
|
|
1209
|
+
ACTIVE_CONSUMER_CHANGE = 31;
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
GET_TOPICS_OF_NAMESPACE = 32;
|
|
1213
|
+
GET_TOPICS_OF_NAMESPACE_RESPONSE = 33;
|
|
1214
|
+
|
|
1215
|
+
GET_SCHEMA = 34;
|
|
1216
|
+
GET_SCHEMA_RESPONSE = 35;
|
|
1217
|
+
|
|
1218
|
+
AUTH_CHALLENGE = 36;
|
|
1219
|
+
AUTH_RESPONSE = 37;
|
|
1220
|
+
|
|
1221
|
+
ACK_RESPONSE = 38;
|
|
1222
|
+
|
|
1223
|
+
GET_OR_CREATE_SCHEMA = 39;
|
|
1224
|
+
GET_OR_CREATE_SCHEMA_RESPONSE = 40;
|
|
1225
|
+
|
|
1226
|
+
// transaction related
|
|
1227
|
+
NEW_TXN = 50;
|
|
1228
|
+
NEW_TXN_RESPONSE = 51;
|
|
1229
|
+
|
|
1230
|
+
ADD_PARTITION_TO_TXN = 52;
|
|
1231
|
+
ADD_PARTITION_TO_TXN_RESPONSE = 53;
|
|
1232
|
+
|
|
1233
|
+
ADD_SUBSCRIPTION_TO_TXN = 54;
|
|
1234
|
+
ADD_SUBSCRIPTION_TO_TXN_RESPONSE = 55;
|
|
1235
|
+
|
|
1236
|
+
END_TXN = 56;
|
|
1237
|
+
END_TXN_RESPONSE = 57;
|
|
1238
|
+
|
|
1239
|
+
END_TXN_ON_PARTITION = 58;
|
|
1240
|
+
END_TXN_ON_PARTITION_RESPONSE = 59;
|
|
1241
|
+
|
|
1242
|
+
END_TXN_ON_SUBSCRIPTION = 60;
|
|
1243
|
+
END_TXN_ON_SUBSCRIPTION_RESPONSE = 61;
|
|
1244
|
+
TC_CLIENT_CONNECT_REQUEST = 62;
|
|
1245
|
+
TC_CLIENT_CONNECT_RESPONSE = 63;
|
|
1246
|
+
|
|
1247
|
+
WATCH_TOPIC_LIST = 64;
|
|
1248
|
+
WATCH_TOPIC_LIST_SUCCESS = 65;
|
|
1249
|
+
WATCH_TOPIC_UPDATE = 66;
|
|
1250
|
+
WATCH_TOPIC_LIST_CLOSE = 67;
|
|
1251
|
+
|
|
1252
|
+
TOPIC_MIGRATED = 68;
|
|
1253
|
+
|
|
1254
|
+
SCALABLE_TOPIC_LOOKUP = 70;
|
|
1255
|
+
SCALABLE_TOPIC_UPDATE = 71;
|
|
1256
|
+
SCALABLE_TOPIC_CLOSE = 72;
|
|
1257
|
+
|
|
1258
|
+
SCALABLE_TOPIC_SUBSCRIBE = 73;
|
|
1259
|
+
SCALABLE_TOPIC_SUBSCRIBE_RESPONSE = 74;
|
|
1260
|
+
SCALABLE_TOPIC_ASSIGNMENT_UPDATE = 75;
|
|
1261
|
+
|
|
1262
|
+
WATCH_SCALABLE_TOPICS = 76;
|
|
1263
|
+
WATCH_SCALABLE_TOPICS_UPDATE = 77;
|
|
1264
|
+
WATCH_SCALABLE_TOPICS_CLOSE = 78;
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
required Type type = 1;
|
|
1269
|
+
|
|
1270
|
+
optional CommandConnect connect = 2;
|
|
1271
|
+
optional CommandConnected connected = 3;
|
|
1272
|
+
|
|
1273
|
+
optional CommandSubscribe subscribe = 4;
|
|
1274
|
+
optional CommandProducer producer = 5;
|
|
1275
|
+
optional CommandSend send = 6;
|
|
1276
|
+
optional CommandSendReceipt send_receipt = 7;
|
|
1277
|
+
optional CommandSendError send_error = 8;
|
|
1278
|
+
optional CommandMessage message = 9;
|
|
1279
|
+
optional CommandAck ack = 10;
|
|
1280
|
+
optional CommandFlow flow = 11;
|
|
1281
|
+
optional CommandUnsubscribe unsubscribe = 12;
|
|
1282
|
+
|
|
1283
|
+
optional CommandSuccess success = 13;
|
|
1284
|
+
optional CommandError error = 14;
|
|
1285
|
+
|
|
1286
|
+
optional CommandCloseProducer close_producer = 15;
|
|
1287
|
+
optional CommandCloseConsumer close_consumer = 16;
|
|
1288
|
+
|
|
1289
|
+
optional CommandProducerSuccess producer_success = 17;
|
|
1290
|
+
optional CommandPing ping = 18;
|
|
1291
|
+
optional CommandPong pong = 19;
|
|
1292
|
+
optional CommandRedeliverUnacknowledgedMessages redeliverUnacknowledgedMessages = 20;
|
|
1293
|
+
|
|
1294
|
+
optional CommandPartitionedTopicMetadata partitionMetadata = 21;
|
|
1295
|
+
optional CommandPartitionedTopicMetadataResponse partitionMetadataResponse = 22;
|
|
1296
|
+
|
|
1297
|
+
optional CommandLookupTopic lookupTopic = 23;
|
|
1298
|
+
optional CommandLookupTopicResponse lookupTopicResponse = 24;
|
|
1299
|
+
|
|
1300
|
+
optional CommandConsumerStats consumerStats = 25;
|
|
1301
|
+
optional CommandConsumerStatsResponse consumerStatsResponse = 26;
|
|
1302
|
+
|
|
1303
|
+
optional CommandReachedEndOfTopic reachedEndOfTopic = 27;
|
|
1304
|
+
|
|
1305
|
+
optional CommandSeek seek = 28;
|
|
1306
|
+
|
|
1307
|
+
optional CommandGetLastMessageId getLastMessageId = 29;
|
|
1308
|
+
optional CommandGetLastMessageIdResponse getLastMessageIdResponse = 30;
|
|
1309
|
+
|
|
1310
|
+
optional CommandActiveConsumerChange active_consumer_change = 31;
|
|
1311
|
+
|
|
1312
|
+
optional CommandGetTopicsOfNamespace getTopicsOfNamespace = 32;
|
|
1313
|
+
optional CommandGetTopicsOfNamespaceResponse getTopicsOfNamespaceResponse = 33;
|
|
1314
|
+
|
|
1315
|
+
optional CommandGetSchema getSchema = 34;
|
|
1316
|
+
optional CommandGetSchemaResponse getSchemaResponse = 35;
|
|
1317
|
+
|
|
1318
|
+
optional CommandAuthChallenge authChallenge = 36;
|
|
1319
|
+
optional CommandAuthResponse authResponse = 37;
|
|
1320
|
+
|
|
1321
|
+
optional CommandAckResponse ackResponse = 38;
|
|
1322
|
+
|
|
1323
|
+
optional CommandGetOrCreateSchema getOrCreateSchema = 39;
|
|
1324
|
+
optional CommandGetOrCreateSchemaResponse getOrCreateSchemaResponse = 40;
|
|
1325
|
+
|
|
1326
|
+
// transaction related
|
|
1327
|
+
optional CommandNewTxn newTxn = 50;
|
|
1328
|
+
optional CommandNewTxnResponse newTxnResponse = 51;
|
|
1329
|
+
optional CommandAddPartitionToTxn addPartitionToTxn= 52;
|
|
1330
|
+
optional CommandAddPartitionToTxnResponse addPartitionToTxnResponse = 53;
|
|
1331
|
+
optional CommandAddSubscriptionToTxn addSubscriptionToTxn = 54;
|
|
1332
|
+
optional CommandAddSubscriptionToTxnResponse addSubscriptionToTxnResponse = 55;
|
|
1333
|
+
optional CommandEndTxn endTxn = 56;
|
|
1334
|
+
optional CommandEndTxnResponse endTxnResponse = 57;
|
|
1335
|
+
optional CommandEndTxnOnPartition endTxnOnPartition = 58;
|
|
1336
|
+
optional CommandEndTxnOnPartitionResponse endTxnOnPartitionResponse = 59;
|
|
1337
|
+
optional CommandEndTxnOnSubscription endTxnOnSubscription = 60;
|
|
1338
|
+
optional CommandEndTxnOnSubscriptionResponse endTxnOnSubscriptionResponse = 61;
|
|
1339
|
+
optional CommandTcClientConnectRequest tcClientConnectRequest = 62;
|
|
1340
|
+
optional CommandTcClientConnectResponse tcClientConnectResponse = 63;
|
|
1341
|
+
|
|
1342
|
+
optional CommandWatchTopicList watchTopicList = 64;
|
|
1343
|
+
optional CommandWatchTopicListSuccess watchTopicListSuccess = 65;
|
|
1344
|
+
optional CommandWatchTopicUpdate watchTopicUpdate = 66;
|
|
1345
|
+
optional CommandWatchTopicListClose watchTopicListClose = 67;
|
|
1346
|
+
|
|
1347
|
+
optional CommandTopicMigrated topicMigrated = 68;
|
|
1348
|
+
|
|
1349
|
+
optional CommandScalableTopicLookup scalableTopicLookup = 70;
|
|
1350
|
+
optional CommandScalableTopicUpdate scalableTopicUpdate = 71;
|
|
1351
|
+
optional CommandScalableTopicClose scalableTopicClose = 72;
|
|
1352
|
+
|
|
1353
|
+
optional CommandScalableTopicSubscribe scalableTopicSubscribe = 73;
|
|
1354
|
+
optional CommandScalableTopicSubscribeResponse scalableTopicSubscribeResponse = 74;
|
|
1355
|
+
optional CommandScalableTopicAssignmentUpdate scalableTopicAssignmentUpdate = 75;
|
|
1356
|
+
|
|
1357
|
+
optional CommandWatchScalableTopics watchScalableTopics = 76;
|
|
1358
|
+
optional CommandWatchScalableTopicsUpdate watchScalableTopicsUpdate = 77;
|
|
1359
|
+
optional CommandWatchScalableTopicsClose watchScalableTopicsClose = 78;
|
|
1360
|
+
}
|