fluentd-plugins-pulsar 0.0.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: bc39f46d66d5a58365ce2f1a5c1b49a204ac69628ad1f6f6919a0b2c13913395
4
+ data.tar.gz: ef39085b735b40ff35d9a3871af88384456c885f8dfa38d28db70f92dc2d26c2
5
+ SHA512:
6
+ metadata.gz: 7a571e775d54f850d6c83207da1f002b952ccec3dbacc1db8dbd2a8655f74eccd53b7aa8e8be9a22a65c8222fc680b915ecbd003f002d6dccc4e44a51fea8e74
7
+ data.tar.gz: 32ad34afb71c197a8b637ef3381e6571131255eb1955847460e33bda70420563af8b4164927011b70956c3953d13aaa03f8009dc1caf57a27430a02c5f76276b
@@ -0,0 +1,70 @@
1
+ #
2
+ # Copyright 2019- zhengwei01
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ require "fluent/plugin/input"
17
+ require 'fluent/plugin/pulsar_client/PulsarClient'
18
+ module Fluent
19
+ module Plugin
20
+ class InPulsarParser < Parser
21
+ Fluent::Plugin.register_parser('in_pulsar', self)
22
+ def parse(text)
23
+ # this plugin is dummy implementation not to raise error
24
+ yield nil, nil
25
+ end
26
+ end
27
+ class PulsarInput < Fluent::Plugin::Input
28
+ Fluent::Plugin.register_input("pulsar", self)
29
+ helpers :server, :extract, :compat_parameters
30
+ desc 'Tag of output events.'
31
+ config_param :tag, :string, default: 'debug.access'
32
+ desc 'The port of pulsar.'
33
+ config_param :pulsar_port, :integer, default: 6650
34
+ desc 'The host of pulsar.'
35
+ config_param :pulsar_host, :string, default: '127.0.0.1'
36
+ desc 'The topic of pulsar.'
37
+ config_param :pulsar_topic, :string, default: 'my-topic'
38
+ desc 'The subscription of pulsar.'
39
+ config_param :pulsar_subscription, :string, default: 'sub'
40
+ desc 'The subtype of pulsar.'
41
+ config_param :pulsar_subtype, :integer, default: 1
42
+ desc 'The pull duration of pulsar client.'
43
+ config_param :pull_duration, :string, default: '0.1'
44
+ config_section :parse do
45
+ config_set_default :@type, 'in_pulsar'
46
+ end
47
+ def configure(conf)
48
+ super
49
+
50
+ end
51
+ def start
52
+ super
53
+ client = Message::PulsarClient.new()
54
+ client.connect(@pulsar_host, @pulsar_port)
55
+ client.subscribe(@pulsar_topic, @pulsar_subscription, @pulsar_subtype)
56
+ while true do
57
+ m = client.get_message()
58
+ if m != nil
59
+ time = Fluent::Engine.now
60
+ record = {"message_entry_id"=>m.message_entry_id, "message_ledger_id"=>m.message_ledger_id, "client_created_id"=>m.client_created_id, "message"=>m.message}
61
+ client.ack(m.client_created_id, m.message_ledger_id, m.message_entry_id)
62
+ router.emit(@tag, time, record)
63
+ else
64
+ sleep @pull_duration.to_f
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,56 @@
1
+
2
+ require "fluent/plugin/output"
3
+ require 'fluent/plugin/pulsar_client/PulsarClient'
4
+ module Fluent
5
+ module Plugin
6
+ class PulsarOutput < Fluent::Plugin::Output
7
+ Fluent::Plugin.register_input('out_pulsar', self)
8
+ # config Parameters
9
+ desc 'The port of pulsar.'
10
+ config_param :pulsar_port, :integer, default: 6650
11
+ desc 'The host of pulsar.'
12
+ config_param :pulsar_host, :string, default: 'pulsar-proxy.pulsar'
13
+ desc 'The topic of pulsar.'
14
+ config_param :pulsar_topic, :string, default: 'persistent://pulsar/logs/default-topic'
15
+ desc 'The name of producer.'
16
+ config_param :pulsar_producer, :string, default: 'fluentd'
17
+ desc 'The number of messages to send as buffer'
18
+ config_param :num_messages, :int, default: 1
19
+ desc 'The number of retries'
20
+ config_param :num_retry, :int, default: 1
21
+ config_section :parse do
22
+ config_set_default :@type, 'out_pulsar'
23
+ end
24
+ def configure(conf)
25
+ super
26
+
27
+ end
28
+ def start
29
+ super
30
+ client = Message::PulsarClient.new()
31
+ client.connect(@pulsar_host, @pulsar_port)
32
+ log.info "Connected to pulsar brokers successfully"
33
+ end
34
+ def process(tag,es)
35
+ es.each do |time,record|
36
+ log.debug "Producing records to #{@pulsar_topic}"
37
+ send_to_pulsar(record)
38
+ end
39
+ end
40
+ def send_to_pulsar(record)
41
+ retry_count = 0
42
+ if client.send(@pulsar_topic, @pulsar_producer, @num_messages, record) == true
43
+ log.info "Successfully sent a record"
44
+ else
45
+ log.warn "Failed to send, retrying.."
46
+ retry_count += 1
47
+ if (retry_count <= @num_retry)
48
+ send_to_pulsar(record)
49
+ else
50
+ log.error "retry limit exceeded, dropping record.."
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,1626 @@
1
+ ### Generated by rprotoc. DO NOT EDIT!
2
+ ### <proto file: PulsarApi.proto>
3
+ # /**
4
+ # * Licensed to the Apache Software Foundation (ASF) under one
5
+ # * or more contributor license agreements. See the NOTICE file
6
+ # * distributed with this work for additional information
7
+ # * regarding copyright ownership. The ASF licenses this file
8
+ # * to you under the Apache License, Version 2.0 (the
9
+ # * "License"); you may not use this file except in compliance
10
+ # * with the License. You may obtain a copy of the License at
11
+ # *
12
+ # * http://www.apache.org/licenses/LICENSE-2.0
13
+ # *
14
+ # * Unless required by applicable law or agreed to in writing,
15
+ # * software distributed under the License is distributed on an
16
+ # * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
+ # * KIND, either express or implied. See the License for the
18
+ # * specific language governing permissions and limitations
19
+ # * under the License.
20
+ # */
21
+ # syntax = "proto2";
22
+ #
23
+ # package pulsar.proto;
24
+ # option java_package = "org.apache.pulsar.common.api.proto";
25
+ # option optimize_for = LITE_RUNTIME;
26
+ #
27
+ # message Schema {
28
+ # enum Type {
29
+ # None = 0;
30
+ # String = 1;
31
+ # Json = 2;
32
+ # Protobuf = 3;
33
+ # Avro = 4;
34
+ # Bool = 5;
35
+ # Int8 = 6;
36
+ # Int16 = 7;
37
+ # Int32 = 8;
38
+ # Int64 = 9;
39
+ # Float = 10;
40
+ # Double = 11;
41
+ # Date = 12;
42
+ # Time = 13;
43
+ # Timestamp = 14;
44
+ # KeyValue = 15;
45
+ # }
46
+ #
47
+ # required string name = 1;
48
+ # required bytes schema_data = 3;
49
+ # required Type type = 4;
50
+ # repeated KeyValue properties = 5;
51
+ #
52
+ # }
53
+ #
54
+ # message MessageIdData {
55
+ # required uint64 ledgerId = 1;
56
+ # required uint64 entryId = 2;
57
+ # optional int32 partition = 3 [default = -1];
58
+ # optional int32 batch_index = 4 [default = -1];
59
+ # }
60
+ #
61
+ # message KeyValue {
62
+ # required string key = 1;
63
+ # required string value = 2;
64
+ # }
65
+ #
66
+ # message KeyLongValue {
67
+ # required string key = 1;
68
+ # required uint64 value = 2;
69
+ # }
70
+ #
71
+ # message IntRange {
72
+ # required int32 start = 1;
73
+ # required int32 end = 2;
74
+ # }
75
+ #
76
+ # message EncryptionKeys {
77
+ # required string key = 1;
78
+ # required bytes value = 2;
79
+ # repeated KeyValue metadata = 3;
80
+ # }
81
+ #
82
+ # enum CompressionType {
83
+ # NONE = 0;
84
+ # LZ4 = 1;
85
+ # ZLIB = 2;
86
+ # ZSTD = 3;
87
+ # SNAPPY = 4;
88
+ # }
89
+ #
90
+ # message MessageMetadata {
91
+ # required string producer_name = 1;
92
+ # required uint64 sequence_id = 2;
93
+ # required uint64 publish_time = 3;
94
+ # repeated KeyValue properties = 4;
95
+ #
96
+ # // Property set on replicated message,
97
+ # // includes the source cluster name
98
+ # optional string replicated_from = 5;
99
+ # //key to decide partition for the msg
100
+ # optional string partition_key = 6;
101
+ # // Override namespace's replication
102
+ # repeated string replicate_to = 7;
103
+ # optional CompressionType compression = 8 [default = NONE];
104
+ # optional uint32 uncompressed_size = 9 [default = 0];
105
+ # // Removed below checksum field from Metadata as
106
+ # // it should be part of send-command which keeps checksum of header + payload
107
+ # //optional sfixed64 checksum = 10;
108
+ # // differentiate single and batch message metadata
109
+ # optional int32 num_messages_in_batch = 11 [default = 1];
110
+ #
111
+ # // the timestamp that this event occurs. it is typically set by applications.
112
+ # // if this field is omitted, `publish_time` can be used for the purpose of `event_time`.
113
+ # optional uint64 event_time = 12 [default = 0];
114
+ # // Contains encryption key name, encrypted key and metadata to describe the key
115
+ # repeated EncryptionKeys encryption_keys = 13;
116
+ # // Algorithm used to encrypt data key
117
+ # optional string encryption_algo = 14;
118
+ # // Additional parameters required by encryption
119
+ # optional bytes encryption_param = 15;
120
+ # optional bytes schema_version = 16;
121
+ #
122
+ # optional bool partition_key_b64_encoded = 17 [ default = false ];
123
+ # // Specific a key to overwrite the message key which used for ordering dispatch in Key_Shared mode.
124
+ # optional bytes ordering_key = 18;
125
+ #
126
+ # // Mark the message to be delivered at or after the specified timestamp
127
+ # optional int64 deliver_at_time = 19;
128
+ #
129
+ # // Identify whether a message is a "marker" message used for
130
+ # // internal metadata instead of application published data.
131
+ # // Markers will generally not be propagated back to clients
132
+ # optional int32 marker_type = 20;
133
+ #
134
+ # // transaction related message info
135
+ # optional uint64 txnid_least_bits = 22 [default = 0];
136
+ # optional uint64 txnid_most_bits = 23 [default = 0];
137
+ #
138
+ # /// Add highest sequence id to support batch message with external sequence id
139
+ # optional uint64 highest_sequence_id = 24 [default = 0];
140
+ # }
141
+ #
142
+ # message SingleMessageMetadata {
143
+ # repeated KeyValue properties = 1;
144
+ # optional string partition_key = 2;
145
+ # required int32 payload_size = 3;
146
+ # optional bool compacted_out = 4 [default = false];
147
+ #
148
+ # // the timestamp that this event occurs. it is typically set by applications.
149
+ # // if this field is omitted, `publish_time` can be used for the purpose of `event_time`.
150
+ # optional uint64 event_time = 5 [default = 0];
151
+ # optional bool partition_key_b64_encoded = 6 [ default = false ];
152
+ # // Specific a key to overwrite the message key which used for ordering dispatch in Key_Shared mode.
153
+ # optional bytes ordering_key = 7;
154
+ # // Allows consumer retrieve the sequence id that the producer set.
155
+ # optional uint64 sequence_id = 8;
156
+ # }
157
+ #
158
+ # enum ServerError {
159
+ # UnknownError = 0;
160
+ # MetadataError = 1; // Error with ZK/metadata
161
+ # PersistenceError = 2; // Error writing reading from BK
162
+ # AuthenticationError = 3; // Non valid authentication
163
+ # AuthorizationError = 4; // Not authorized to use resource
164
+ #
165
+ # ConsumerBusy = 5; // Unable to subscribe/unsubscribe because
166
+ # // other consumers are connected
167
+ # ServiceNotReady = 6; // Any error that requires client retry operation with a fresh lookup
168
+ # ProducerBlockedQuotaExceededError = 7; // Unable to create producer because backlog quota exceeded
169
+ # ProducerBlockedQuotaExceededException = 8; // Exception while creating producer because quota exceeded
170
+ # ChecksumError = 9; // Error while verifying message checksum
171
+ # UnsupportedVersionError = 10; // Error when an older client/version doesn't support a required feature
172
+ # TopicNotFound = 11; // Topic not found
173
+ # SubscriptionNotFound = 12; // Subscription not found
174
+ # ConsumerNotFound = 13; // Consumer not found
175
+ # TooManyRequests = 14; // Error with too many simultaneously request
176
+ # TopicTerminatedError = 15; // The topic has been terminated
177
+ #
178
+ # ProducerBusy = 16; // Producer with same name is already connected
179
+ # InvalidTopicName = 17; // The topic name is not valid
180
+ #
181
+ # IncompatibleSchema = 18; // Specified schema was incompatible with topic schema
182
+ # ConsumerAssignError = 19; // Dispatcher assign consumer error
183
+ # }
184
+ #
185
+ # enum AuthMethod {
186
+ # AuthMethodNone = 0;
187
+ # AuthMethodYcaV1 = 1;
188
+ # AuthMethodAthens = 2;
189
+ # }
190
+ #
191
+ # // Each protocol version identify new features that are
192
+ # // incrementally added to the protocol
193
+ # enum ProtocolVersion {
194
+ # v0 = 0; // Initial versioning
195
+ # v1 = 1; // Added application keep-alive
196
+ # v2 = 2; // Added RedeliverUnacknowledgedMessages Command
197
+ # v3 = 3; // Added compression with LZ4 and ZLib
198
+ # v4 = 4; // Added batch message support
199
+ # v5 = 5; // Added disconnect client w/o closing connection
200
+ # v6 = 6; // Added checksum computation for metadata + payload
201
+ # v7 = 7; // Added CommandLookupTopic - Binary Lookup
202
+ # v8 = 8; // Added CommandConsumerStats - Client fetches broker side consumer stats
203
+ # v9 = 9; // Added end of topic notification
204
+ # v10 = 10;// Added proxy to broker
205
+ # v11 = 11;// C++ consumers before this version are not correctly handling the checksum field
206
+ # v12 = 12;// Added get topic's last messageId from broker
207
+ # // Added CommandActiveConsumerChange
208
+ # // Added CommandGetTopicsOfNamespace
209
+ # v13 = 13; // Schema-registry : added avro schema format for json
210
+ # v14 = 14; // Add CommandAuthChallenge and CommandAuthResponse for mutual auth
211
+ # // Added Key_Shared subscription
212
+ # v15 = 15; // Add CommandGetOrCreateSchema and CommandGetOrCreateSchemaResponse
213
+ # }
214
+ #
215
+ # message CommandConnect {
216
+ # required string client_version = 1;
217
+ # optional AuthMethod auth_method = 2; // Deprecated. Use "auth_method_name" instead.
218
+ # optional string auth_method_name = 5;
219
+ # optional bytes auth_data = 3;
220
+ # optional int32 protocol_version = 4 [default = 0];
221
+ #
222
+ # // Client can ask to be proxyied to a specific broker
223
+ # // This is only honored by a Pulsar proxy
224
+ # optional string proxy_to_broker_url = 6;
225
+ #
226
+ # // Original principal that was verified by
227
+ # // a Pulsar proxy. In this case the auth info above
228
+ # // will be the auth of the proxy itself
229
+ # optional string original_principal = 7;
230
+ #
231
+ # // Original auth role and auth Method that was passed
232
+ # // to the proxy. In this case the auth info above
233
+ # // will be the auth of the proxy itself
234
+ # optional string original_auth_data = 8;
235
+ # optional string original_auth_method = 9;
236
+ #
237
+ # }
238
+ #
239
+ # message CommandConnected {
240
+ # required string server_version = 1;
241
+ # optional int32 protocol_version = 2 [default = 0];
242
+ # optional int32 max_message_size = 3;
243
+ # }
244
+ #
245
+ # message CommandAuthResponse {
246
+ # optional string client_version = 1;
247
+ # optional AuthData response = 2;
248
+ # optional int32 protocol_version = 3 [default = 0];
249
+ # }
250
+ #
251
+ # message CommandAuthChallenge {
252
+ # optional string server_version = 1;
253
+ # optional AuthData challenge = 2;
254
+ # optional int32 protocol_version = 3 [default = 0];
255
+ # }
256
+ #
257
+ # // To support mutual authentication type, such as Sasl, reuse this command to mutual auth.
258
+ # message AuthData {
259
+ # optional string auth_method_name = 1;
260
+ # optional bytes auth_data = 2;
261
+ # }
262
+ #
263
+ # enum KeySharedMode {
264
+ # AUTO_SPLIT = 0;
265
+ # STICKY = 1;
266
+ # }
267
+ #
268
+ # message KeySharedMeta {
269
+ # required KeySharedMode keySharedMode = 1;
270
+ # repeated IntRange hashRanges = 3;
271
+ # }
272
+ #
273
+ # message CommandSubscribe {
274
+ # enum SubType {
275
+ # Exclusive = 0;
276
+ # Shared = 1;
277
+ # Failover = 2;
278
+ # Key_Shared = 3;
279
+ # }
280
+ # required string topic = 1;
281
+ # required string subscription = 2;
282
+ # required SubType subType = 3;
283
+ #
284
+ # required uint64 consumer_id = 4;
285
+ # required uint64 request_id = 5;
286
+ # optional string consumer_name = 6;
287
+ # optional int32 priority_level = 7;
288
+ #
289
+ # // Signal wether the subscription should be backed by a
290
+ # // durable cursor or not
291
+ # optional bool durable = 8 [default = true];
292
+ #
293
+ # // If specified, the subscription will position the cursor
294
+ # // markd-delete position on the particular message id and
295
+ # // will send messages from that point
296
+ # optional MessageIdData start_message_id = 9;
297
+ #
298
+ # /// Add optional metadata key=value to this consumer
299
+ # repeated KeyValue metadata = 10;
300
+ #
301
+ # optional bool read_compacted = 11;
302
+ #
303
+ # optional Schema schema = 12;
304
+ # enum InitialPosition {
305
+ # Latest = 0;
306
+ # Earliest = 1;
307
+ # }
308
+ # // Signal whether the subscription will initialize on latest
309
+ # // or not -- earliest
310
+ # optional InitialPosition initialPosition = 13 [default = Latest];
311
+ #
312
+ # // Mark the subscription as "replicated". Pulsar will make sure
313
+ # // to periodically sync the state of replicated subscriptions
314
+ # // across different clusters (when using geo-replication).
315
+ # optional bool replicate_subscription_state = 14;
316
+ #
317
+ # // If true, the subscribe operation will cause a topic to be
318
+ # // created if it does not exist already (and if topic auto-creation
319
+ # // is allowed by broker.
320
+ # // If false, the subscribe operation will fail if the topic
321
+ # // does not exist.
322
+ # optional bool force_topic_creation = 15 [default = true];
323
+ #
324
+ # // If specified, the subscription will reset cursor's position back
325
+ # // to specified seconds and will send messages from that point
326
+ # optional uint64 start_message_rollback_duration_sec = 16 [default = 0];
327
+ #
328
+ # optional KeySharedMeta keySharedMeta = 17;
329
+ # }
330
+ #
331
+ # message CommandPartitionedTopicMetadata {
332
+ # required string topic = 1;
333
+ # required uint64 request_id = 2;
334
+ # // TODO - Remove original_principal, original_auth_data, original_auth_method
335
+ # // Original principal that was verified by
336
+ # // a Pulsar proxy.
337
+ # optional string original_principal = 3;
338
+ #
339
+ # // Original auth role and auth Method that was passed
340
+ # // to the proxy.
341
+ # optional string original_auth_data = 4;
342
+ # optional string original_auth_method = 5;
343
+ # }
344
+ #
345
+ # message CommandPartitionedTopicMetadataResponse {
346
+ # enum LookupType {
347
+ # Success = 0;
348
+ # Failed = 1;
349
+ # }
350
+ # optional uint32 partitions = 1; // Optional in case of error
351
+ # required uint64 request_id = 2;
352
+ # optional LookupType response = 3;
353
+ # optional ServerError error = 4;
354
+ # optional string message = 5;
355
+ # }
356
+ #
357
+ # message CommandLookupTopic {
358
+ # required string topic = 1;
359
+ # required uint64 request_id = 2;
360
+ # optional bool authoritative = 3 [default = false];
361
+ #
362
+ # // TODO - Remove original_principal, original_auth_data, original_auth_method
363
+ # // Original principal that was verified by
364
+ # // a Pulsar proxy.
365
+ # optional string original_principal = 4;
366
+ #
367
+ # // Original auth role and auth Method that was passed
368
+ # // to the proxy.
369
+ # optional string original_auth_data = 5;
370
+ # optional string original_auth_method = 6;
371
+ # }
372
+ #
373
+ # message CommandLookupTopicResponse {
374
+ # enum LookupType {
375
+ # Redirect = 0;
376
+ # Connect = 1;
377
+ # Failed = 2;
378
+ # }
379
+ #
380
+ # optional string brokerServiceUrl = 1; // Optional in case of error
381
+ # optional string brokerServiceUrlTls = 2;
382
+ # optional LookupType response = 3;
383
+ # required uint64 request_id = 4;
384
+ # optional bool authoritative = 5 [default = false];
385
+ # optional ServerError error = 6;
386
+ # optional string message = 7;
387
+ #
388
+ # // If it's true, indicates to the client that it must
389
+ # // always connect through the service url after the
390
+ # // lookup has been completed.
391
+ # optional bool proxy_through_service_url = 8 [default = false];
392
+ # }
393
+ #
394
+ # /// Create a new Producer on a topic, assigning the given producer_id,
395
+ # /// all messages sent with this producer_id will be persisted on the topic
396
+ # message CommandProducer {
397
+ # required string topic = 1;
398
+ # required uint64 producer_id = 2;
399
+ # required uint64 request_id = 3;
400
+ #
401
+ # /// If a producer name is specified, the name will be used,
402
+ # /// otherwise the broker will generate a unique name
403
+ # optional string producer_name = 4;
404
+ #
405
+ # optional bool encrypted = 5 [default = false];
406
+ #
407
+ # /// Add optional metadata key=value to this producer
408
+ # repeated KeyValue metadata = 6;
409
+ #
410
+ # optional Schema schema = 7;
411
+ # }
412
+ #
413
+ # message CommandSend {
414
+ # required uint64 producer_id = 1;
415
+ # required uint64 sequence_id = 2;
416
+ # optional int32 num_messages = 3 [default = 1];
417
+ # optional uint64 txnid_least_bits = 4 [default = 0];
418
+ # optional uint64 txnid_most_bits = 5 [default = 0];
419
+ #
420
+ # /// Add highest sequence id to support batch message with external sequence id
421
+ # optional uint64 highest_sequence_id = 6 [default = 0];
422
+ # }
423
+ #
424
+ # message CommandSendReceipt {
425
+ # required uint64 producer_id = 1;
426
+ # required uint64 sequence_id = 2;
427
+ # optional MessageIdData message_id = 3;
428
+ # }
429
+ #
430
+ # message CommandSendError {
431
+ # required uint64 producer_id = 1;
432
+ # required uint64 sequence_id = 2;
433
+ # required ServerError error = 3;
434
+ # required string message = 4;
435
+ # }
436
+ #
437
+ # message CommandMessage {
438
+ # required uint64 consumer_id = 1;
439
+ # required MessageIdData message_id = 2;
440
+ # optional uint32 redelivery_count = 3 [default = 0];
441
+ # }
442
+ #
443
+ # message CommandAck {
444
+ # enum AckType {
445
+ # Individual = 0;
446
+ # Cumulative = 1;
447
+ # }
448
+ #
449
+ # required uint64 consumer_id = 1;
450
+ # required AckType ack_type = 2;
451
+ #
452
+ # // In case of individual acks, the client can pass a list of message ids
453
+ # repeated MessageIdData message_id = 3;
454
+ #
455
+ # // Acks can contain a flag to indicate the consumer
456
+ # // received an invalid message that got discarded
457
+ # // before being passed on to the application.
458
+ # enum ValidationError {
459
+ # UncompressedSizeCorruption = 0;
460
+ # DecompressionError = 1;
461
+ # ChecksumMismatch = 2;
462
+ # BatchDeSerializeError = 3;
463
+ # DecryptionError = 4;
464
+ # }
465
+ #
466
+ # optional ValidationError validation_error = 4;
467
+ # repeated KeyLongValue properties = 5;
468
+ #
469
+ # optional uint64 txnid_least_bits = 6 [default = 0];
470
+ # optional uint64 txnid_most_bits = 7 [default = 0];
471
+ # }
472
+ #
473
+ # message CommandAckResponse {
474
+ # required uint64 consumer_id = 1;
475
+ # optional uint64 txnid_least_bits = 2 [default = 0];
476
+ # optional uint64 txnid_most_bits = 3 [default = 0];
477
+ # optional ServerError error = 4;
478
+ # optional string message = 5;
479
+ # }
480
+ #
481
+ # // changes on active consumer
482
+ # message CommandActiveConsumerChange {
483
+ # required uint64 consumer_id = 1;
484
+ # optional bool is_active = 2 [default = false];
485
+ # }
486
+ #
487
+ # message CommandFlow {
488
+ # required uint64 consumer_id = 1;
489
+ #
490
+ # // Max number of messages to prefetch, in addition
491
+ # // of any number previously specified
492
+ # required uint32 messagePermits = 2;
493
+ # }
494
+ #
495
+ # message CommandUnsubscribe {
496
+ # required uint64 consumer_id = 1;
497
+ # required uint64 request_id = 2;
498
+ # }
499
+ #
500
+ # // Reset an existing consumer to a particular message id
501
+ # message CommandSeek {
502
+ # required uint64 consumer_id = 1;
503
+ # required uint64 request_id = 2;
504
+ #
505
+ # optional MessageIdData message_id = 3;
506
+ # optional uint64 message_publish_time = 4;
507
+ # }
508
+ #
509
+ # // Message sent by broker to client when a topic
510
+ # // has been forcefully terminated and there are no more
511
+ # // messages left to consume
512
+ # message CommandReachedEndOfTopic {
513
+ # required uint64 consumer_id = 1;
514
+ # }
515
+ #
516
+ # message CommandCloseProducer {
517
+ # required uint64 producer_id = 1;
518
+ # required uint64 request_id = 2;
519
+ # }
520
+ #
521
+ # message CommandCloseConsumer {
522
+ # required uint64 consumer_id = 1;
523
+ # required uint64 request_id = 2;
524
+ # }
525
+ #
526
+ # message CommandRedeliverUnacknowledgedMessages {
527
+ # required uint64 consumer_id = 1;
528
+ # repeated MessageIdData message_ids = 2;
529
+ # }
530
+ #
531
+ # message CommandSuccess {
532
+ # required uint64 request_id = 1;
533
+ # optional Schema schema = 2;
534
+ # }
535
+ #
536
+ # /// Response from CommandProducer
537
+ # message CommandProducerSuccess {
538
+ # required uint64 request_id = 1;
539
+ # required string producer_name = 2;
540
+ #
541
+ # // The last sequence id that was stored by this producer in the previous session
542
+ # // This will only be meaningful if deduplication has been enabled.
543
+ # optional int64 last_sequence_id = 3 [default = -1];
544
+ # optional bytes schema_version = 4;
545
+ # }
546
+ #
547
+ # message CommandError {
548
+ # required uint64 request_id = 1;
549
+ # required ServerError error = 2;
550
+ # required string message = 3;
551
+ # }
552
+ #
553
+ # // Commands to probe the state of connection.
554
+ # // When either client or broker doesn't receive commands for certain
555
+ # // amount of time, they will send a Ping probe.
556
+ # message CommandPing {
557
+ # }
558
+ # message CommandPong {
559
+ # }
560
+ #
561
+ # message CommandConsumerStats {
562
+ # required uint64 request_id = 1;
563
+ # // required string topic_name = 2;
564
+ # // required string subscription_name = 3;
565
+ # required uint64 consumer_id = 4;
566
+ # }
567
+ #
568
+ # message CommandConsumerStatsResponse {
569
+ # required uint64 request_id = 1;
570
+ # optional ServerError error_code = 2;
571
+ # optional string error_message = 3;
572
+ #
573
+ # /// Total rate of messages delivered to the consumer. msg/s
574
+ # optional double msgRateOut = 4;
575
+ #
576
+ # /// Total throughput delivered to the consumer. bytes/s
577
+ # optional double msgThroughputOut = 5;
578
+ #
579
+ # /// Total rate of messages redelivered by this consumer. msg/s
580
+ # optional double msgRateRedeliver = 6;
581
+ #
582
+ # /// Name of the consumer
583
+ # optional string consumerName = 7;
584
+ #
585
+ # /// Number of available message permits for the consumer
586
+ # optional uint64 availablePermits = 8;
587
+ #
588
+ # /// Number of unacknowledged messages for the consumer
589
+ # optional uint64 unackedMessages = 9;
590
+ #
591
+ # /// Flag to verify if consumer is blocked due to reaching threshold of unacked messages
592
+ # optional bool blockedConsumerOnUnackedMsgs = 10;
593
+ #
594
+ # /// Address of this consumer
595
+ # optional string address = 11;
596
+ #
597
+ # /// Timestamp of connection
598
+ # optional string connectedSince = 12;
599
+ #
600
+ # /// Whether this subscription is Exclusive or Shared or Failover
601
+ # optional string type = 13;
602
+ #
603
+ # /// Total rate of messages expired on this subscription. msg/s
604
+ # optional double msgRateExpired = 14;
605
+ #
606
+ # /// Number of messages in the subscription backlog
607
+ # optional uint64 msgBacklog = 15;
608
+ # }
609
+ #
610
+ # message CommandGetLastMessageId {
611
+ # required uint64 consumer_id = 1;
612
+ # required uint64 request_id = 2;
613
+ # }
614
+ #
615
+ # message CommandGetLastMessageIdResponse {
616
+ # required MessageIdData last_message_id = 1;
617
+ # required uint64 request_id = 2;
618
+ # }
619
+ #
620
+ # message CommandGetTopicsOfNamespace {
621
+ # enum Mode {
622
+ # PERSISTENT = 0;
623
+ # NON_PERSISTENT = 1;
624
+ # ALL = 2;
625
+ # }
626
+ # required uint64 request_id = 1;
627
+ # required string namespace = 2;
628
+ # optional Mode mode = 3 [default = PERSISTENT];
629
+ # }
630
+ #
631
+ # message CommandGetTopicsOfNamespaceResponse {
632
+ # required uint64 request_id = 1;
633
+ # repeated string topics = 2;
634
+ # }
635
+ #
636
+ # message CommandGetSchema {
637
+ # required uint64 request_id = 1;
638
+ # required string topic = 2;
639
+ #
640
+ # optional bytes schema_version = 3;
641
+ # }
642
+ #
643
+ # message CommandGetSchemaResponse {
644
+ # required uint64 request_id = 1;
645
+ # optional ServerError error_code = 2;
646
+ # optional string error_message = 3;
647
+ #
648
+ # optional Schema schema = 4;
649
+ # optional bytes schema_version = 5;
650
+ # }
651
+ #
652
+ # message CommandGetOrCreateSchema {
653
+ # required uint64 request_id = 1;
654
+ # required string topic = 2;
655
+ # required Schema schema = 3;
656
+ # }
657
+ #
658
+ # message CommandGetOrCreateSchemaResponse {
659
+ # required uint64 request_id = 1;
660
+ # optional ServerError error_code = 2;
661
+ # optional string error_message = 3;
662
+ #
663
+ # optional bytes schema_version = 4;
664
+ # }
665
+ #
666
+ # /// --- transaction related ---
667
+ #
668
+ # enum TxnAction {
669
+ # COMMIT = 0;
670
+ # ABORT = 1;
671
+ # }
672
+ #
673
+ # message CommandNewTxn {
674
+ # required uint64 request_id = 1;
675
+ # optional uint64 txn_ttl_seconds = 2 [default = 0];
676
+ # }
677
+ #
678
+ # message CommandNewTxnResponse {
679
+ # required uint64 request_id = 1;
680
+ # optional uint64 txnid_least_bits = 2 [default = 0];
681
+ # optional uint64 txnid_most_bits = 3 [default = 0];
682
+ # optional ServerError error = 4;
683
+ # optional string message = 5;
684
+ # }
685
+ #
686
+ # message CommandAddPartitionToTxn {
687
+ # required uint64 request_id = 1;
688
+ # optional uint64 txnid_least_bits = 2 [default = 0];
689
+ # optional uint64 txnid_most_bits = 3 [default = 0];
690
+ # repeated string partitions = 4;
691
+ # }
692
+ #
693
+ # message CommandAddPartitionToTxnResponse {
694
+ # required uint64 request_id = 1;
695
+ # optional uint64 txnid_least_bits = 2 [default = 0];
696
+ # optional uint64 txnid_most_bits = 3 [default = 0];
697
+ # optional ServerError error = 4;
698
+ # optional string message = 5;
699
+ # }
700
+ #
701
+ # message Subscription {
702
+ # required string topic = 1;
703
+ # required string subscription = 2;
704
+ # }
705
+ # message CommandAddSubscriptionToTxn {
706
+ # required uint64 request_id = 1;
707
+ # optional uint64 txnid_least_bits = 2 [default = 0];
708
+ # optional uint64 txnid_most_bits = 3 [default = 0];
709
+ # repeated Subscription subscription = 4;
710
+ # }
711
+ #
712
+ # message CommandAddSubscriptionToTxnResponse {
713
+ # required uint64 request_id = 1;
714
+ # optional uint64 txnid_least_bits = 2 [default = 0];
715
+ # optional uint64 txnid_most_bits = 3 [default = 0];
716
+ # optional ServerError error = 4;
717
+ # optional string message = 5;
718
+ # }
719
+ #
720
+ # message CommandEndTxn {
721
+ # required uint64 request_id = 1;
722
+ # optional uint64 txnid_least_bits = 2 [default = 0];
723
+ # optional uint64 txnid_most_bits = 3 [default = 0];
724
+ # optional TxnAction txn_action = 4;
725
+ # }
726
+ #
727
+ # message CommandEndTxnResponse {
728
+ # required uint64 request_id = 1;
729
+ # optional uint64 txnid_least_bits = 2 [default = 0];
730
+ # optional uint64 txnid_most_bits = 3 [default = 0];
731
+ # optional ServerError error = 4;
732
+ # optional string message = 5;
733
+ # }
734
+ #
735
+ # message CommandEndTxnOnPartition {
736
+ # required uint64 request_id = 1;
737
+ # optional uint64 txnid_least_bits = 2 [default = 0];
738
+ # optional uint64 txnid_most_bits = 3 [default = 0];
739
+ # optional string topic = 4;
740
+ # optional TxnAction txn_action = 5;
741
+ # }
742
+ #
743
+ # message CommandEndTxnOnPartitionResponse {
744
+ # required uint64 request_id = 1;
745
+ # optional uint64 txnid_least_bits = 2 [default = 0];
746
+ # optional uint64 txnid_most_bits = 3 [default = 0];
747
+ # optional ServerError error = 4;
748
+ # optional string message = 5;
749
+ # }
750
+ #
751
+ # message CommandEndTxnOnSubscription {
752
+ # required uint64 request_id = 1;
753
+ # optional uint64 txnid_least_bits = 2 [default = 0];
754
+ # optional uint64 txnid_most_bits = 3 [default = 0];
755
+ # optional Subscription subscription= 4;
756
+ # optional TxnAction txn_action = 5;
757
+ # }
758
+ #
759
+ # message CommandEndTxnOnSubscriptionResponse {
760
+ # required uint64 request_id = 1;
761
+ # optional uint64 txnid_least_bits = 2 [default = 0];
762
+ # optional uint64 txnid_most_bits = 3 [default = 0];
763
+ # optional ServerError error = 4;
764
+ # optional string message = 5;
765
+ # }
766
+ #
767
+ # message BaseCommand {
768
+ # enum Type {
769
+ # CONNECT = 2;
770
+ # CONNECTED = 3;
771
+ # SUBSCRIBE = 4;
772
+ #
773
+ # PRODUCER = 5;
774
+ #
775
+ # SEND = 6;
776
+ # SEND_RECEIPT= 7;
777
+ # SEND_ERROR = 8;
778
+ #
779
+ # MESSAGE = 9;
780
+ # ACK = 10;
781
+ # FLOW = 11;
782
+ #
783
+ # UNSUBSCRIBE = 12;
784
+ #
785
+ # SUCCESS = 13;
786
+ # ERROR = 14;
787
+ #
788
+ # CLOSE_PRODUCER = 15;
789
+ # CLOSE_CONSUMER = 16;
790
+ #
791
+ # PRODUCER_SUCCESS = 17;
792
+ #
793
+ # PING = 18;
794
+ # PONG = 19;
795
+ #
796
+ # REDELIVER_UNACKNOWLEDGED_MESSAGES = 20;
797
+ #
798
+ # PARTITIONED_METADATA = 21;
799
+ # PARTITIONED_METADATA_RESPONSE = 22;
800
+ #
801
+ # LOOKUP = 23;
802
+ # LOOKUP_RESPONSE = 24;
803
+ #
804
+ # CONSUMER_STATS = 25;
805
+ # CONSUMER_STATS_RESPONSE = 26;
806
+ #
807
+ # REACHED_END_OF_TOPIC = 27;
808
+ #
809
+ # SEEK = 28;
810
+ #
811
+ # GET_LAST_MESSAGE_ID = 29;
812
+ # GET_LAST_MESSAGE_ID_RESPONSE = 30;
813
+ #
814
+ # ACTIVE_CONSUMER_CHANGE = 31;
815
+ #
816
+ #
817
+ # GET_TOPICS_OF_NAMESPACE = 32;
818
+ # GET_TOPICS_OF_NAMESPACE_RESPONSE = 33;
819
+ #
820
+ # GET_SCHEMA = 34;
821
+ # GET_SCHEMA_RESPONSE = 35;
822
+ #
823
+ # AUTH_CHALLENGE = 36;
824
+ # AUTH_RESPONSE = 37;
825
+ #
826
+ # ACK_RESPONSE = 38;
827
+ #
828
+ # GET_OR_CREATE_SCHEMA = 39;
829
+ # GET_OR_CREATE_SCHEMA_RESPONSE = 40;
830
+ #
831
+ # // transaction related
832
+ # NEW_TXN = 50;
833
+ # NEW_TXN_RESPONSE = 51;
834
+ #
835
+ # ADD_PARTITION_TO_TXN = 52;
836
+ # ADD_PARTITION_TO_TXN_RESPONSE = 53;
837
+ #
838
+ # ADD_SUBSCRIPTION_TO_TXN = 54;
839
+ # ADD_SUBSCRIPTION_TO_TXN_RESPONSE = 55;
840
+ #
841
+ # END_TXN = 56;
842
+ # END_TXN_RESPONSE = 57;
843
+ #
844
+ # END_TXN_ON_PARTITION = 58;
845
+ # END_TXN_ON_PARTITION_RESPONSE = 59;
846
+ #
847
+ # END_TXN_ON_SUBSCRIPTION = 60;
848
+ # END_TXN_ON_SUBSCRIPTION_RESPONSE = 61;
849
+ #
850
+ # }
851
+ #
852
+ #
853
+ # required Type type = 1;
854
+ #
855
+ # optional CommandConnect connect = 2;
856
+ # optional CommandConnected connected = 3;
857
+ #
858
+ # optional CommandSubscribe subscribe = 4;
859
+ # optional CommandProducer producer = 5;
860
+ # optional CommandSend send = 6;
861
+ # optional CommandSendReceipt send_receipt = 7;
862
+ # optional CommandSendError send_error = 8;
863
+ # optional CommandMessage message = 9;
864
+ # optional CommandAck ack = 10;
865
+ # optional CommandFlow flow = 11;
866
+ # optional CommandUnsubscribe unsubscribe = 12;
867
+ #
868
+ # optional CommandSuccess success = 13;
869
+ # optional CommandError error = 14;
870
+ #
871
+ # optional CommandCloseProducer close_producer = 15;
872
+ # optional CommandCloseConsumer close_consumer = 16;
873
+ #
874
+ # optional CommandProducerSuccess producer_success = 17;
875
+ # optional CommandPing ping = 18;
876
+ # optional CommandPong pong = 19;
877
+ # optional CommandRedeliverUnacknowledgedMessages redeliverUnacknowledgedMessages = 20;
878
+ #
879
+ # optional CommandPartitionedTopicMetadata partitionMetadata = 21;
880
+ # optional CommandPartitionedTopicMetadataResponse partitionMetadataResponse = 22;
881
+ #
882
+ # optional CommandLookupTopic lookupTopic = 23;
883
+ # optional CommandLookupTopicResponse lookupTopicResponse = 24;
884
+ #
885
+ # optional CommandConsumerStats consumerStats = 25;
886
+ # optional CommandConsumerStatsResponse consumerStatsResponse = 26;
887
+ #
888
+ # optional CommandReachedEndOfTopic reachedEndOfTopic = 27;
889
+ #
890
+ # optional CommandSeek seek = 28;
891
+ #
892
+ # optional CommandGetLastMessageId getLastMessageId = 29;
893
+ # optional CommandGetLastMessageIdResponse getLastMessageIdResponse = 30;
894
+ #
895
+ # optional CommandActiveConsumerChange active_consumer_change = 31;
896
+ #
897
+ # optional CommandGetTopicsOfNamespace getTopicsOfNamespace = 32;
898
+ # optional CommandGetTopicsOfNamespaceResponse getTopicsOfNamespaceResponse = 33;
899
+ #
900
+ # optional CommandGetSchema getSchema = 34;
901
+ # optional CommandGetSchemaResponse getSchemaResponse = 35;
902
+ #
903
+ # optional CommandAuthChallenge authChallenge = 36;
904
+ # optional CommandAuthResponse authResponse = 37;
905
+ #
906
+ # optional CommandAckResponse ackResponse = 38;
907
+ #
908
+ # optional CommandGetOrCreateSchema getOrCreateSchema = 39;
909
+ # optional CommandGetOrCreateSchemaResponse getOrCreateSchemaResponse = 40;
910
+ #
911
+ # // transaction related
912
+ # optional CommandNewTxn newTxn = 50;
913
+ # optional CommandNewTxnResponse newTxnResponse = 51;
914
+ # optional CommandAddPartitionToTxn addPartitionToTxn= 52;
915
+ # optional CommandAddPartitionToTxnResponse addPartitionToTxnResponse = 53;
916
+ # optional CommandAddSubscriptionToTxn addSubscriptionToTxn = 54;
917
+ # optional CommandAddSubscriptionToTxnResponse addSubscriptionToTxnResponse = 55;
918
+ # optional CommandEndTxn endTxn = 56;
919
+ # optional CommandEndTxnResponse endTxnResponse = 57;
920
+ # optional CommandEndTxnOnPartition endTxnOnPartition = 58;
921
+ # optional CommandEndTxnOnPartitionResponse endTxnOnPartitionResponse = 59;
922
+ # optional CommandEndTxnOnSubscription endTxnOnSubscription = 60;
923
+ # optional CommandEndTxnOnSubscriptionResponse endTxnOnSubscriptionResponse = 61;
924
+ # }
925
+
926
+ require 'protobuf/message/message'
927
+ require 'protobuf/message/enum'
928
+ require 'protobuf/message/service'
929
+ require 'protobuf/message/extend'
930
+
931
+ module Pulsar
932
+ module Proto
933
+ ::Protobuf::OPTIONS[:"java_package"] = "org.apache.pulsar.common.api.proto"
934
+ ::Protobuf::OPTIONS[:"optimize_for"] = :LITE_RUNTIME
935
+ class Schema < ::Protobuf::Message
936
+ defined_in __FILE__
937
+ class Type < ::Protobuf::Enum
938
+ defined_in __FILE__
939
+ None = value(:None, 0)
940
+ String = value(:String, 1)
941
+ Json = value(:Json, 2)
942
+ Protobuf = value(:Protobuf, 3)
943
+ Avro = value(:Avro, 4)
944
+ Bool = value(:Bool, 5)
945
+ Int8 = value(:Int8, 6)
946
+ Int16 = value(:Int16, 7)
947
+ Int32 = value(:Int32, 8)
948
+ Int64 = value(:Int64, 9)
949
+ Float = value(:Float, 10)
950
+ Double = value(:Double, 11)
951
+ Date = value(:Date, 12)
952
+ Time = value(:Time, 13)
953
+ Timestamp = value(:Timestamp, 14)
954
+ KeyValue = value(:KeyValue, 15)
955
+ end
956
+ required :string, :name, 1
957
+ required :bytes, :schema_data, 3
958
+ required :Type, :type, 4
959
+ repeated :KeyValue, :properties, 5
960
+ end
961
+ class MessageIdData < ::Protobuf::Message
962
+ defined_in __FILE__
963
+ required :uint64, :ledgerId, 1
964
+ required :uint64, :entryId, 2
965
+ optional :int32, :partition, 3, :default => -1
966
+ optional :int32, :batch_index, 4, :default => -1
967
+ end
968
+ class KeyValue < ::Protobuf::Message
969
+ defined_in __FILE__
970
+ required :string, :key, 1
971
+ required :string, :value, 2
972
+ end
973
+ class KeyLongValue < ::Protobuf::Message
974
+ defined_in __FILE__
975
+ required :string, :key, 1
976
+ required :uint64, :value, 2
977
+ end
978
+ class IntRange < ::Protobuf::Message
979
+ defined_in __FILE__
980
+ required :int32, :start, 1
981
+ required :int32, :end, 2
982
+ end
983
+ class EncryptionKeys < ::Protobuf::Message
984
+ defined_in __FILE__
985
+ required :string, :key, 1
986
+ required :bytes, :value, 2
987
+ repeated :KeyValue, :metadata, 3
988
+ end
989
+ class CompressionType < ::Protobuf::Enum
990
+ defined_in __FILE__
991
+ NONE = value(:NONE, 0)
992
+ LZ4 = value(:LZ4, 1)
993
+ ZLIB = value(:ZLIB, 2)
994
+ ZSTD = value(:ZSTD, 3)
995
+ SNAPPY = value(:SNAPPY, 4)
996
+ end
997
+ class MessageMetadata < ::Protobuf::Message
998
+ defined_in __FILE__
999
+ required :string, :producer_name, 1
1000
+ required :uint64, :sequence_id, 2
1001
+ required :uint64, :publish_time, 3
1002
+ repeated :KeyValue, :properties, 4
1003
+ optional :string, :replicated_from, 5
1004
+ optional :string, :partition_key, 6
1005
+ repeated :string, :replicate_to, 7
1006
+ optional :CompressionType, :compression, 8, :default => :NONE
1007
+ optional :uint32, :uncompressed_size, 9, :default => 0
1008
+ optional :int32, :num_messages_in_batch, 11, :default => 1
1009
+ optional :uint64, :event_time, 12, :default => 0
1010
+ repeated :EncryptionKeys, :encryption_keys, 13
1011
+ optional :string, :encryption_algo, 14
1012
+ optional :bytes, :encryption_param, 15
1013
+ optional :bytes, :schema_version, 16
1014
+ optional :bool, :partition_key_b64_encoded, 17, :default => false
1015
+ optional :bytes, :ordering_key, 18
1016
+ optional :int64, :deliver_at_time, 19
1017
+ optional :int32, :marker_type, 20
1018
+ optional :uint64, :txnid_least_bits, 22, :default => 0
1019
+ optional :uint64, :txnid_most_bits, 23, :default => 0
1020
+ optional :uint64, :highest_sequence_id, 24, :default => 0
1021
+ end
1022
+ class SingleMessageMetadata < ::Protobuf::Message
1023
+ defined_in __FILE__
1024
+ repeated :KeyValue, :properties, 1
1025
+ optional :string, :partition_key, 2
1026
+ required :int32, :payload_size, 3
1027
+ optional :bool, :compacted_out, 4, :default => false
1028
+ optional :uint64, :event_time, 5, :default => 0
1029
+ optional :bool, :partition_key_b64_encoded, 6, :default => false
1030
+ optional :bytes, :ordering_key, 7
1031
+ optional :uint64, :sequence_id, 8
1032
+ end
1033
+ class ServerError < ::Protobuf::Enum
1034
+ defined_in __FILE__
1035
+ UnknownError = value(:UnknownError, 0)
1036
+ MetadataError = value(:MetadataError, 1)
1037
+ PersistenceError = value(:PersistenceError, 2)
1038
+ AuthenticationError = value(:AuthenticationError, 3)
1039
+ AuthorizationError = value(:AuthorizationError, 4)
1040
+ ConsumerBusy = value(:ConsumerBusy, 5)
1041
+ ServiceNotReady = value(:ServiceNotReady, 6)
1042
+ ProducerBlockedQuotaExceededError = value(:ProducerBlockedQuotaExceededError, 7)
1043
+ ProducerBlockedQuotaExceededException = value(:ProducerBlockedQuotaExceededException, 8)
1044
+ ChecksumError = value(:ChecksumError, 9)
1045
+ UnsupportedVersionError = value(:UnsupportedVersionError, 10)
1046
+ TopicNotFound = value(:TopicNotFound, 11)
1047
+ SubscriptionNotFound = value(:SubscriptionNotFound, 12)
1048
+ ConsumerNotFound = value(:ConsumerNotFound, 13)
1049
+ TooManyRequests = value(:TooManyRequests, 14)
1050
+ TopicTerminatedError = value(:TopicTerminatedError, 15)
1051
+ ProducerBusy = value(:ProducerBusy, 16)
1052
+ InvalidTopicName = value(:InvalidTopicName, 17)
1053
+ IncompatibleSchema = value(:IncompatibleSchema, 18)
1054
+ ConsumerAssignError = value(:ConsumerAssignError, 19)
1055
+ end
1056
+ class AuthMethod < ::Protobuf::Enum
1057
+ defined_in __FILE__
1058
+ AuthMethodNone = value(:AuthMethodNone, 0)
1059
+ AuthMethodYcaV1 = value(:AuthMethodYcaV1, 1)
1060
+ AuthMethodAthens = value(:AuthMethodAthens, 2)
1061
+ end
1062
+ class ProtocolVersion < ::Protobuf::Enum
1063
+ defined_in __FILE__
1064
+ V0 = value(:v0, 0)
1065
+ V1 = value(:v1, 1)
1066
+ V2 = value(:v2, 2)
1067
+ V3 = value(:v3, 3)
1068
+ V4 = value(:v4, 4)
1069
+ V5 = value(:v5, 5)
1070
+ V6 = value(:v6, 6)
1071
+ V7 = value(:v7, 7)
1072
+ V8 = value(:v8, 8)
1073
+ V9 = value(:v9, 9)
1074
+ V10 = value(:v10, 10)
1075
+ V11 = value(:v11, 11)
1076
+ V12 = value(:v12, 12)
1077
+ V13 = value(:v13, 13)
1078
+ V14 = value(:v14, 14)
1079
+ V15 = value(:v15, 15)
1080
+ end
1081
+ class CommandConnect < ::Protobuf::Message
1082
+ defined_in __FILE__
1083
+ required :string, :client_version, 1
1084
+ optional :AuthMethod, :auth_method, 2
1085
+ optional :string, :auth_method_name, 5
1086
+ optional :bytes, :auth_data, 3
1087
+ optional :int32, :protocol_version, 4, :default => 0
1088
+ optional :string, :proxy_to_broker_url, 6
1089
+ optional :string, :original_principal, 7
1090
+ optional :string, :original_auth_data, 8
1091
+ optional :string, :original_auth_method, 9
1092
+ end
1093
+ class CommandConnected < ::Protobuf::Message
1094
+ defined_in __FILE__
1095
+ required :string, :server_version, 1
1096
+ optional :int32, :protocol_version, 2, :default => 0
1097
+ optional :int32, :max_message_size, 3
1098
+ end
1099
+ class CommandAuthResponse < ::Protobuf::Message
1100
+ defined_in __FILE__
1101
+ optional :string, :client_version, 1
1102
+ optional :AuthData, :response, 2
1103
+ optional :int32, :protocol_version, 3, :default => 0
1104
+ end
1105
+ class CommandAuthChallenge < ::Protobuf::Message
1106
+ defined_in __FILE__
1107
+ optional :string, :server_version, 1
1108
+ optional :AuthData, :challenge, 2
1109
+ optional :int32, :protocol_version, 3, :default => 0
1110
+ end
1111
+ class AuthData < ::Protobuf::Message
1112
+ defined_in __FILE__
1113
+ optional :string, :auth_method_name, 1
1114
+ optional :bytes, :auth_data, 2
1115
+ end
1116
+ class KeySharedMode < ::Protobuf::Enum
1117
+ defined_in __FILE__
1118
+ AUTO_SPLIT = value(:AUTO_SPLIT, 0)
1119
+ STICKY = value(:STICKY, 1)
1120
+ end
1121
+ class KeySharedMeta < ::Protobuf::Message
1122
+ defined_in __FILE__
1123
+ required :KeySharedMode, :keySharedMode, 1
1124
+ repeated :IntRange, :hashRanges, 3
1125
+ end
1126
+ class CommandSubscribe < ::Protobuf::Message
1127
+ defined_in __FILE__
1128
+ class SubType < ::Protobuf::Enum
1129
+ defined_in __FILE__
1130
+ Exclusive = value(:Exclusive, 0)
1131
+ Shared = value(:Shared, 1)
1132
+ Failover = value(:Failover, 2)
1133
+ Key_Shared = value(:Key_Shared, 3)
1134
+ end
1135
+ required :string, :topic, 1
1136
+ required :string, :subscription, 2
1137
+ required :SubType, :subType, 3
1138
+ required :uint64, :consumer_id, 4
1139
+ required :uint64, :request_id, 5
1140
+ optional :string, :consumer_name, 6
1141
+ optional :int32, :priority_level, 7
1142
+ optional :bool, :durable, 8, :default => true
1143
+ optional :MessageIdData, :start_message_id, 9
1144
+ repeated :KeyValue, :metadata, 10
1145
+ optional :bool, :read_compacted, 11
1146
+ optional :Schema, :schema, 12
1147
+ class InitialPosition < ::Protobuf::Enum
1148
+ defined_in __FILE__
1149
+ Latest = value(:Latest, 0)
1150
+ Earliest = value(:Earliest, 1)
1151
+ end
1152
+ optional :InitialPosition, :initialPosition, 13, :default => :Latest
1153
+ optional :bool, :replicate_subscription_state, 14
1154
+ optional :bool, :force_topic_creation, 15, :default => true
1155
+ optional :uint64, :start_message_rollback_duration_sec, 16, :default => 0
1156
+ optional :KeySharedMeta, :keySharedMeta, 17
1157
+ end
1158
+ class CommandPartitionedTopicMetadata < ::Protobuf::Message
1159
+ defined_in __FILE__
1160
+ required :string, :topic, 1
1161
+ required :uint64, :request_id, 2
1162
+ optional :string, :original_principal, 3
1163
+ optional :string, :original_auth_data, 4
1164
+ optional :string, :original_auth_method, 5
1165
+ end
1166
+ class CommandPartitionedTopicMetadataResponse < ::Protobuf::Message
1167
+ defined_in __FILE__
1168
+ class LookupType < ::Protobuf::Enum
1169
+ defined_in __FILE__
1170
+ Success = value(:Success, 0)
1171
+ Failed = value(:Failed, 1)
1172
+ end
1173
+ optional :uint32, :partitions, 1
1174
+ required :uint64, :request_id, 2
1175
+ optional :LookupType, :response, 3
1176
+ optional :ServerError, :error, 4
1177
+ optional :string, :message, 5
1178
+ end
1179
+ class CommandLookupTopic < ::Protobuf::Message
1180
+ defined_in __FILE__
1181
+ required :string, :topic, 1
1182
+ required :uint64, :request_id, 2
1183
+ optional :bool, :authoritative, 3, :default => false
1184
+ optional :string, :original_principal, 4
1185
+ optional :string, :original_auth_data, 5
1186
+ optional :string, :original_auth_method, 6
1187
+ end
1188
+ class CommandLookupTopicResponse < ::Protobuf::Message
1189
+ defined_in __FILE__
1190
+ class LookupType < ::Protobuf::Enum
1191
+ defined_in __FILE__
1192
+ Redirect = value(:Redirect, 0)
1193
+ Connect = value(:Connect, 1)
1194
+ Failed = value(:Failed, 2)
1195
+ end
1196
+ optional :string, :brokerServiceUrl, 1
1197
+ optional :string, :brokerServiceUrlTls, 2
1198
+ optional :LookupType, :response, 3
1199
+ required :uint64, :request_id, 4
1200
+ optional :bool, :authoritative, 5, :default => false
1201
+ optional :ServerError, :error, 6
1202
+ optional :string, :message, 7
1203
+ optional :bool, :proxy_through_service_url, 8, :default => false
1204
+ end
1205
+ class CommandProducer < ::Protobuf::Message
1206
+ defined_in __FILE__
1207
+ required :string, :topic, 1
1208
+ required :uint64, :producer_id, 2
1209
+ required :uint64, :request_id, 3
1210
+ optional :string, :producer_name, 4
1211
+ optional :bool, :encrypted, 5, :default => false
1212
+ repeated :KeyValue, :metadata, 6
1213
+ optional :Schema, :schema, 7
1214
+ end
1215
+ class CommandSend < ::Protobuf::Message
1216
+ defined_in __FILE__
1217
+ required :uint64, :producer_id, 1
1218
+ required :uint64, :sequence_id, 2
1219
+ optional :int32, :num_messages, 3, :default => 1
1220
+ optional :uint64, :txnid_least_bits, 4, :default => 0
1221
+ optional :uint64, :txnid_most_bits, 5, :default => 0
1222
+ optional :uint64, :highest_sequence_id, 6, :default => 0
1223
+ end
1224
+ class CommandSendReceipt < ::Protobuf::Message
1225
+ defined_in __FILE__
1226
+ required :uint64, :producer_id, 1
1227
+ required :uint64, :sequence_id, 2
1228
+ optional :MessageIdData, :message_id, 3
1229
+ end
1230
+ class CommandSendError < ::Protobuf::Message
1231
+ defined_in __FILE__
1232
+ required :uint64, :producer_id, 1
1233
+ required :uint64, :sequence_id, 2
1234
+ required :ServerError, :error, 3
1235
+ required :string, :message, 4
1236
+ end
1237
+ class CommandMessage < ::Protobuf::Message
1238
+ defined_in __FILE__
1239
+ required :uint64, :consumer_id, 1
1240
+ required :MessageIdData, :message_id, 2
1241
+ optional :uint32, :redelivery_count, 3, :default => 0
1242
+ end
1243
+ class CommandAck < ::Protobuf::Message
1244
+ defined_in __FILE__
1245
+ class AckType < ::Protobuf::Enum
1246
+ defined_in __FILE__
1247
+ Individual = value(:Individual, 0)
1248
+ Cumulative = value(:Cumulative, 1)
1249
+ end
1250
+ required :uint64, :consumer_id, 1
1251
+ required :AckType, :ack_type, 2
1252
+ repeated :MessageIdData, :message_id, 3
1253
+ class ValidationError < ::Protobuf::Enum
1254
+ defined_in __FILE__
1255
+ UncompressedSizeCorruption = value(:UncompressedSizeCorruption, 0)
1256
+ DecompressionError = value(:DecompressionError, 1)
1257
+ ChecksumMismatch = value(:ChecksumMismatch, 2)
1258
+ BatchDeSerializeError = value(:BatchDeSerializeError, 3)
1259
+ DecryptionError = value(:DecryptionError, 4)
1260
+ end
1261
+ optional :ValidationError, :validation_error, 4
1262
+ repeated :KeyLongValue, :properties, 5
1263
+ optional :uint64, :txnid_least_bits, 6, :default => 0
1264
+ optional :uint64, :txnid_most_bits, 7, :default => 0
1265
+ end
1266
+ class CommandAckResponse < ::Protobuf::Message
1267
+ defined_in __FILE__
1268
+ required :uint64, :consumer_id, 1
1269
+ optional :uint64, :txnid_least_bits, 2, :default => 0
1270
+ optional :uint64, :txnid_most_bits, 3, :default => 0
1271
+ optional :ServerError, :error, 4
1272
+ optional :string, :message, 5
1273
+ end
1274
+ class CommandActiveConsumerChange < ::Protobuf::Message
1275
+ defined_in __FILE__
1276
+ required :uint64, :consumer_id, 1
1277
+ optional :bool, :is_active, 2, :default => false
1278
+ end
1279
+ class CommandFlow < ::Protobuf::Message
1280
+ defined_in __FILE__
1281
+ required :uint64, :consumer_id, 1
1282
+ required :uint32, :messagePermits, 2
1283
+ end
1284
+ class CommandUnsubscribe < ::Protobuf::Message
1285
+ defined_in __FILE__
1286
+ required :uint64, :consumer_id, 1
1287
+ required :uint64, :request_id, 2
1288
+ end
1289
+ class CommandSeek < ::Protobuf::Message
1290
+ defined_in __FILE__
1291
+ required :uint64, :consumer_id, 1
1292
+ required :uint64, :request_id, 2
1293
+ optional :MessageIdData, :message_id, 3
1294
+ optional :uint64, :message_publish_time, 4
1295
+ end
1296
+ class CommandReachedEndOfTopic < ::Protobuf::Message
1297
+ defined_in __FILE__
1298
+ required :uint64, :consumer_id, 1
1299
+ end
1300
+ class CommandCloseProducer < ::Protobuf::Message
1301
+ defined_in __FILE__
1302
+ required :uint64, :producer_id, 1
1303
+ required :uint64, :request_id, 2
1304
+ end
1305
+ class CommandCloseConsumer < ::Protobuf::Message
1306
+ defined_in __FILE__
1307
+ required :uint64, :consumer_id, 1
1308
+ required :uint64, :request_id, 2
1309
+ end
1310
+ class CommandRedeliverUnacknowledgedMessages < ::Protobuf::Message
1311
+ defined_in __FILE__
1312
+ required :uint64, :consumer_id, 1
1313
+ repeated :MessageIdData, :message_ids, 2
1314
+ end
1315
+ class CommandSuccess < ::Protobuf::Message
1316
+ defined_in __FILE__
1317
+ required :uint64, :request_id, 1
1318
+ optional :Schema, :schema, 2
1319
+ end
1320
+ class CommandProducerSuccess < ::Protobuf::Message
1321
+ defined_in __FILE__
1322
+ required :uint64, :request_id, 1
1323
+ required :string, :producer_name, 2
1324
+ optional :int64, :last_sequence_id, 3, :default => -1
1325
+ optional :bytes, :schema_version, 4
1326
+ end
1327
+ class CommandError < ::Protobuf::Message
1328
+ defined_in __FILE__
1329
+ required :uint64, :request_id, 1
1330
+ required :ServerError, :error, 2
1331
+ required :string, :message, 3
1332
+ end
1333
+ class CommandPing < ::Protobuf::Message
1334
+ defined_in __FILE__
1335
+ end
1336
+ class CommandPong < ::Protobuf::Message
1337
+ defined_in __FILE__
1338
+ end
1339
+ class CommandConsumerStats < ::Protobuf::Message
1340
+ defined_in __FILE__
1341
+ required :uint64, :request_id, 1
1342
+ required :uint64, :consumer_id, 4
1343
+ end
1344
+ class CommandConsumerStatsResponse < ::Protobuf::Message
1345
+ defined_in __FILE__
1346
+ required :uint64, :request_id, 1
1347
+ optional :ServerError, :error_code, 2
1348
+ optional :string, :error_message, 3
1349
+ optional :double, :msgRateOut, 4
1350
+ optional :double, :msgThroughputOut, 5
1351
+ optional :double, :msgRateRedeliver, 6
1352
+ optional :string, :consumerName, 7
1353
+ optional :uint64, :availablePermits, 8
1354
+ optional :uint64, :unackedMessages, 9
1355
+ optional :bool, :blockedConsumerOnUnackedMsgs, 10
1356
+ optional :string, :address, 11
1357
+ optional :string, :connectedSince, 12
1358
+ optional :string, :type, 13
1359
+ optional :double, :msgRateExpired, 14
1360
+ optional :uint64, :msgBacklog, 15
1361
+ end
1362
+ class CommandGetLastMessageId < ::Protobuf::Message
1363
+ defined_in __FILE__
1364
+ required :uint64, :consumer_id, 1
1365
+ required :uint64, :request_id, 2
1366
+ end
1367
+ class CommandGetLastMessageIdResponse < ::Protobuf::Message
1368
+ defined_in __FILE__
1369
+ required :MessageIdData, :last_message_id, 1
1370
+ required :uint64, :request_id, 2
1371
+ end
1372
+ class CommandGetTopicsOfNamespace < ::Protobuf::Message
1373
+ defined_in __FILE__
1374
+ class Mode < ::Protobuf::Enum
1375
+ defined_in __FILE__
1376
+ PERSISTENT = value(:PERSISTENT, 0)
1377
+ NON_PERSISTENT = value(:NON_PERSISTENT, 1)
1378
+ ALL = value(:ALL, 2)
1379
+ end
1380
+ required :uint64, :request_id, 1
1381
+ required :string, :namespace, 2
1382
+ optional :Mode, :mode, 3, :default => :PERSISTENT
1383
+ end
1384
+ class CommandGetTopicsOfNamespaceResponse < ::Protobuf::Message
1385
+ defined_in __FILE__
1386
+ required :uint64, :request_id, 1
1387
+ repeated :string, :topics, 2
1388
+ end
1389
+ class CommandGetSchema < ::Protobuf::Message
1390
+ defined_in __FILE__
1391
+ required :uint64, :request_id, 1
1392
+ required :string, :topic, 2
1393
+ optional :bytes, :schema_version, 3
1394
+ end
1395
+ class CommandGetSchemaResponse < ::Protobuf::Message
1396
+ defined_in __FILE__
1397
+ required :uint64, :request_id, 1
1398
+ optional :ServerError, :error_code, 2
1399
+ optional :string, :error_message, 3
1400
+ optional :Schema, :schema, 4
1401
+ optional :bytes, :schema_version, 5
1402
+ end
1403
+ class CommandGetOrCreateSchema < ::Protobuf::Message
1404
+ defined_in __FILE__
1405
+ required :uint64, :request_id, 1
1406
+ required :string, :topic, 2
1407
+ required :Schema, :schema, 3
1408
+ end
1409
+ class CommandGetOrCreateSchemaResponse < ::Protobuf::Message
1410
+ defined_in __FILE__
1411
+ required :uint64, :request_id, 1
1412
+ optional :ServerError, :error_code, 2
1413
+ optional :string, :error_message, 3
1414
+ optional :bytes, :schema_version, 4
1415
+ end
1416
+ class TxnAction < ::Protobuf::Enum
1417
+ defined_in __FILE__
1418
+ COMMIT = value(:COMMIT, 0)
1419
+ ABORT = value(:ABORT, 1)
1420
+ end
1421
+ class CommandNewTxn < ::Protobuf::Message
1422
+ defined_in __FILE__
1423
+ required :uint64, :request_id, 1
1424
+ optional :uint64, :txn_ttl_seconds, 2, :default => 0
1425
+ end
1426
+ class CommandNewTxnResponse < ::Protobuf::Message
1427
+ defined_in __FILE__
1428
+ required :uint64, :request_id, 1
1429
+ optional :uint64, :txnid_least_bits, 2, :default => 0
1430
+ optional :uint64, :txnid_most_bits, 3, :default => 0
1431
+ optional :ServerError, :error, 4
1432
+ optional :string, :message, 5
1433
+ end
1434
+ class CommandAddPartitionToTxn < ::Protobuf::Message
1435
+ defined_in __FILE__
1436
+ required :uint64, :request_id, 1
1437
+ optional :uint64, :txnid_least_bits, 2, :default => 0
1438
+ optional :uint64, :txnid_most_bits, 3, :default => 0
1439
+ repeated :string, :partitions, 4
1440
+ end
1441
+ class CommandAddPartitionToTxnResponse < ::Protobuf::Message
1442
+ defined_in __FILE__
1443
+ required :uint64, :request_id, 1
1444
+ optional :uint64, :txnid_least_bits, 2, :default => 0
1445
+ optional :uint64, :txnid_most_bits, 3, :default => 0
1446
+ optional :ServerError, :error, 4
1447
+ optional :string, :message, 5
1448
+ end
1449
+ class Subscription < ::Protobuf::Message
1450
+ defined_in __FILE__
1451
+ required :string, :topic, 1
1452
+ required :string, :subscription, 2
1453
+ end
1454
+ class CommandAddSubscriptionToTxn < ::Protobuf::Message
1455
+ defined_in __FILE__
1456
+ required :uint64, :request_id, 1
1457
+ optional :uint64, :txnid_least_bits, 2, :default => 0
1458
+ optional :uint64, :txnid_most_bits, 3, :default => 0
1459
+ repeated :Subscription, :subscription, 4
1460
+ end
1461
+ class CommandAddSubscriptionToTxnResponse < ::Protobuf::Message
1462
+ defined_in __FILE__
1463
+ required :uint64, :request_id, 1
1464
+ optional :uint64, :txnid_least_bits, 2, :default => 0
1465
+ optional :uint64, :txnid_most_bits, 3, :default => 0
1466
+ optional :ServerError, :error, 4
1467
+ optional :string, :message, 5
1468
+ end
1469
+ class CommandEndTxn < ::Protobuf::Message
1470
+ defined_in __FILE__
1471
+ required :uint64, :request_id, 1
1472
+ optional :uint64, :txnid_least_bits, 2, :default => 0
1473
+ optional :uint64, :txnid_most_bits, 3, :default => 0
1474
+ optional :TxnAction, :txn_action, 4
1475
+ end
1476
+ class CommandEndTxnResponse < ::Protobuf::Message
1477
+ defined_in __FILE__
1478
+ required :uint64, :request_id, 1
1479
+ optional :uint64, :txnid_least_bits, 2, :default => 0
1480
+ optional :uint64, :txnid_most_bits, 3, :default => 0
1481
+ optional :ServerError, :error, 4
1482
+ optional :string, :message, 5
1483
+ end
1484
+ class CommandEndTxnOnPartition < ::Protobuf::Message
1485
+ defined_in __FILE__
1486
+ required :uint64, :request_id, 1
1487
+ optional :uint64, :txnid_least_bits, 2, :default => 0
1488
+ optional :uint64, :txnid_most_bits, 3, :default => 0
1489
+ optional :string, :topic, 4
1490
+ optional :TxnAction, :txn_action, 5
1491
+ end
1492
+ class CommandEndTxnOnPartitionResponse < ::Protobuf::Message
1493
+ defined_in __FILE__
1494
+ required :uint64, :request_id, 1
1495
+ optional :uint64, :txnid_least_bits, 2, :default => 0
1496
+ optional :uint64, :txnid_most_bits, 3, :default => 0
1497
+ optional :ServerError, :error, 4
1498
+ optional :string, :message, 5
1499
+ end
1500
+ class CommandEndTxnOnSubscription < ::Protobuf::Message
1501
+ defined_in __FILE__
1502
+ required :uint64, :request_id, 1
1503
+ optional :uint64, :txnid_least_bits, 2, :default => 0
1504
+ optional :uint64, :txnid_most_bits, 3, :default => 0
1505
+ optional :Subscription, :subscription, 4
1506
+ optional :TxnAction, :txn_action, 5
1507
+ end
1508
+ class CommandEndTxnOnSubscriptionResponse < ::Protobuf::Message
1509
+ defined_in __FILE__
1510
+ required :uint64, :request_id, 1
1511
+ optional :uint64, :txnid_least_bits, 2, :default => 0
1512
+ optional :uint64, :txnid_most_bits, 3, :default => 0
1513
+ optional :ServerError, :error, 4
1514
+ optional :string, :message, 5
1515
+ end
1516
+ class BaseCommand < ::Protobuf::Message
1517
+ defined_in __FILE__
1518
+ class Type < ::Protobuf::Enum
1519
+ defined_in __FILE__
1520
+ CONNECT = value(:CONNECT, 2)
1521
+ CONNECTED = value(:CONNECTED, 3)
1522
+ SUBSCRIBE = value(:SUBSCRIBE, 4)
1523
+ PRODUCER = value(:PRODUCER, 5)
1524
+ SEND = value(:SEND, 6)
1525
+ SEND_RECEIPT = value(:SEND_RECEIPT, 7)
1526
+ SEND_ERROR = value(:SEND_ERROR, 8)
1527
+ MESSAGE = value(:MESSAGE, 9)
1528
+ ACK = value(:ACK, 10)
1529
+ FLOW = value(:FLOW, 11)
1530
+ UNSUBSCRIBE = value(:UNSUBSCRIBE, 12)
1531
+ SUCCESS = value(:SUCCESS, 13)
1532
+ ERROR = value(:ERROR, 14)
1533
+ CLOSE_PRODUCER = value(:CLOSE_PRODUCER, 15)
1534
+ CLOSE_CONSUMER = value(:CLOSE_CONSUMER, 16)
1535
+ PRODUCER_SUCCESS = value(:PRODUCER_SUCCESS, 17)
1536
+ PING = value(:PING, 18)
1537
+ PONG = value(:PONG, 19)
1538
+ REDELIVER_UNACKNOWLEDGED_MESSAGES = value(:REDELIVER_UNACKNOWLEDGED_MESSAGES, 20)
1539
+ PARTITIONED_METADATA = value(:PARTITIONED_METADATA, 21)
1540
+ PARTITIONED_METADATA_RESPONSE = value(:PARTITIONED_METADATA_RESPONSE, 22)
1541
+ LOOKUP = value(:LOOKUP, 23)
1542
+ LOOKUP_RESPONSE = value(:LOOKUP_RESPONSE, 24)
1543
+ CONSUMER_STATS = value(:CONSUMER_STATS, 25)
1544
+ CONSUMER_STATS_RESPONSE = value(:CONSUMER_STATS_RESPONSE, 26)
1545
+ REACHED_END_OF_TOPIC = value(:REACHED_END_OF_TOPIC, 27)
1546
+ SEEK = value(:SEEK, 28)
1547
+ GET_LAST_MESSAGE_ID = value(:GET_LAST_MESSAGE_ID, 29)
1548
+ GET_LAST_MESSAGE_ID_RESPONSE = value(:GET_LAST_MESSAGE_ID_RESPONSE, 30)
1549
+ ACTIVE_CONSUMER_CHANGE = value(:ACTIVE_CONSUMER_CHANGE, 31)
1550
+ GET_TOPICS_OF_NAMESPACE = value(:GET_TOPICS_OF_NAMESPACE, 32)
1551
+ GET_TOPICS_OF_NAMESPACE_RESPONSE = value(:GET_TOPICS_OF_NAMESPACE_RESPONSE, 33)
1552
+ GET_SCHEMA = value(:GET_SCHEMA, 34)
1553
+ GET_SCHEMA_RESPONSE = value(:GET_SCHEMA_RESPONSE, 35)
1554
+ AUTH_CHALLENGE = value(:AUTH_CHALLENGE, 36)
1555
+ AUTH_RESPONSE = value(:AUTH_RESPONSE, 37)
1556
+ ACK_RESPONSE = value(:ACK_RESPONSE, 38)
1557
+ GET_OR_CREATE_SCHEMA = value(:GET_OR_CREATE_SCHEMA, 39)
1558
+ GET_OR_CREATE_SCHEMA_RESPONSE = value(:GET_OR_CREATE_SCHEMA_RESPONSE, 40)
1559
+ NEW_TXN = value(:NEW_TXN, 50)
1560
+ NEW_TXN_RESPONSE = value(:NEW_TXN_RESPONSE, 51)
1561
+ ADD_PARTITION_TO_TXN = value(:ADD_PARTITION_TO_TXN, 52)
1562
+ ADD_PARTITION_TO_TXN_RESPONSE = value(:ADD_PARTITION_TO_TXN_RESPONSE, 53)
1563
+ ADD_SUBSCRIPTION_TO_TXN = value(:ADD_SUBSCRIPTION_TO_TXN, 54)
1564
+ ADD_SUBSCRIPTION_TO_TXN_RESPONSE = value(:ADD_SUBSCRIPTION_TO_TXN_RESPONSE, 55)
1565
+ END_TXN = value(:END_TXN, 56)
1566
+ END_TXN_RESPONSE = value(:END_TXN_RESPONSE, 57)
1567
+ END_TXN_ON_PARTITION = value(:END_TXN_ON_PARTITION, 58)
1568
+ END_TXN_ON_PARTITION_RESPONSE = value(:END_TXN_ON_PARTITION_RESPONSE, 59)
1569
+ END_TXN_ON_SUBSCRIPTION = value(:END_TXN_ON_SUBSCRIPTION, 60)
1570
+ END_TXN_ON_SUBSCRIPTION_RESPONSE = value(:END_TXN_ON_SUBSCRIPTION_RESPONSE, 61)
1571
+ end
1572
+ required :Type, :type, 1
1573
+ optional :CommandConnect, :connect, 2
1574
+ optional :CommandConnected, :connected, 3
1575
+ optional :CommandSubscribe, :subscribe, 4
1576
+ optional :CommandProducer, :producer, 5
1577
+ optional :CommandSend, :send, 6
1578
+ optional :CommandSendReceipt, :send_receipt, 7
1579
+ optional :CommandSendError, :send_error, 8
1580
+ optional :CommandMessage, :message, 9
1581
+ optional :CommandAck, :ack, 10
1582
+ optional :CommandFlow, :flow, 11
1583
+ optional :CommandUnsubscribe, :unsubscribe, 12
1584
+ optional :CommandSuccess, :success, 13
1585
+ optional :CommandError, :error, 14
1586
+ optional :CommandCloseProducer, :close_producer, 15
1587
+ optional :CommandCloseConsumer, :close_consumer, 16
1588
+ optional :CommandProducerSuccess, :producer_success, 17
1589
+ optional :CommandPing, :ping, 18
1590
+ optional :CommandPong, :pong, 19
1591
+ optional :CommandRedeliverUnacknowledgedMessages, :redeliverUnacknowledgedMessages, 20
1592
+ optional :CommandPartitionedTopicMetadata, :partitionMetadata, 21
1593
+ optional :CommandPartitionedTopicMetadataResponse, :partitionMetadataResponse, 22
1594
+ optional :CommandLookupTopic, :lookupTopic, 23
1595
+ optional :CommandLookupTopicResponse, :lookupTopicResponse, 24
1596
+ optional :CommandConsumerStats, :consumerStats, 25
1597
+ optional :CommandConsumerStatsResponse, :consumerStatsResponse, 26
1598
+ optional :CommandReachedEndOfTopic, :reachedEndOfTopic, 27
1599
+ optional :CommandSeek, :seek, 28
1600
+ optional :CommandGetLastMessageId, :getLastMessageId, 29
1601
+ optional :CommandGetLastMessageIdResponse, :getLastMessageIdResponse, 30
1602
+ optional :CommandActiveConsumerChange, :active_consumer_change, 31
1603
+ optional :CommandGetTopicsOfNamespace, :getTopicsOfNamespace, 32
1604
+ optional :CommandGetTopicsOfNamespaceResponse, :getTopicsOfNamespaceResponse, 33
1605
+ optional :CommandGetSchema, :getSchema, 34
1606
+ optional :CommandGetSchemaResponse, :getSchemaResponse, 35
1607
+ optional :CommandAuthChallenge, :authChallenge, 36
1608
+ optional :CommandAuthResponse, :authResponse, 37
1609
+ optional :CommandAckResponse, :ackResponse, 38
1610
+ optional :CommandGetOrCreateSchema, :getOrCreateSchema, 39
1611
+ optional :CommandGetOrCreateSchemaResponse, :getOrCreateSchemaResponse, 40
1612
+ optional :CommandNewTxn, :newTxn, 50
1613
+ optional :CommandNewTxnResponse, :newTxnResponse, 51
1614
+ optional :CommandAddPartitionToTxn, :addPartitionToTxn, 52
1615
+ optional :CommandAddPartitionToTxnResponse, :addPartitionToTxnResponse, 53
1616
+ optional :CommandAddSubscriptionToTxn, :addSubscriptionToTxn, 54
1617
+ optional :CommandAddSubscriptionToTxnResponse, :addSubscriptionToTxnResponse, 55
1618
+ optional :CommandEndTxn, :endTxn, 56
1619
+ optional :CommandEndTxnResponse, :endTxnResponse, 57
1620
+ optional :CommandEndTxnOnPartition, :endTxnOnPartition, 58
1621
+ optional :CommandEndTxnOnPartitionResponse, :endTxnOnPartitionResponse, 59
1622
+ optional :CommandEndTxnOnSubscription, :endTxnOnSubscription, 60
1623
+ optional :CommandEndTxnOnSubscriptionResponse, :endTxnOnSubscriptionResponse, 61
1624
+ end
1625
+ end
1626
+ end