pulsar_sdk 0.8.8

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.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +51 -0
  3. data/Gemfile +6 -0
  4. data/LICENSE +201 -0
  5. data/README.md +107 -0
  6. data/Rakefile +2 -0
  7. data/bin/console +15 -0
  8. data/bin/setup +8 -0
  9. data/lib/protobuf/pulsar_api.pb.rb +710 -0
  10. data/lib/protobuf/pulsar_api.proto +934 -0
  11. data/lib/protobuf/validate.rb +41 -0
  12. data/lib/pulsar_admin.rb +14 -0
  13. data/lib/pulsar_admin/api.rb +215 -0
  14. data/lib/pulsar_sdk.rb +55 -0
  15. data/lib/pulsar_sdk/client.rb +13 -0
  16. data/lib/pulsar_sdk/client/connection.rb +371 -0
  17. data/lib/pulsar_sdk/client/connection_pool.rb +79 -0
  18. data/lib/pulsar_sdk/client/rpc.rb +67 -0
  19. data/lib/pulsar_sdk/consumer.rb +13 -0
  20. data/lib/pulsar_sdk/consumer/base.rb +148 -0
  21. data/lib/pulsar_sdk/consumer/manager.rb +127 -0
  22. data/lib/pulsar_sdk/consumer/message_tracker.rb +86 -0
  23. data/lib/pulsar_sdk/options.rb +6 -0
  24. data/lib/pulsar_sdk/options/base.rb +10 -0
  25. data/lib/pulsar_sdk/options/connection.rb +51 -0
  26. data/lib/pulsar_sdk/options/consumer.rb +34 -0
  27. data/lib/pulsar_sdk/options/producer.rb +14 -0
  28. data/lib/pulsar_sdk/options/reader.rb +7 -0
  29. data/lib/pulsar_sdk/options/tls.rb +8 -0
  30. data/lib/pulsar_sdk/producer.rb +14 -0
  31. data/lib/pulsar_sdk/producer/base.rb +154 -0
  32. data/lib/pulsar_sdk/producer/manager.rb +67 -0
  33. data/lib/pulsar_sdk/producer/message.rb +47 -0
  34. data/lib/pulsar_sdk/producer/router.rb +100 -0
  35. data/lib/pulsar_sdk/protocol.rb +8 -0
  36. data/lib/pulsar_sdk/protocol/frame.rb +53 -0
  37. data/lib/pulsar_sdk/protocol/lookup.rb +55 -0
  38. data/lib/pulsar_sdk/protocol/message.rb +55 -0
  39. data/lib/pulsar_sdk/protocol/namespace.rb +22 -0
  40. data/lib/pulsar_sdk/protocol/partitioned.rb +54 -0
  41. data/lib/pulsar_sdk/protocol/reader.rb +67 -0
  42. data/lib/pulsar_sdk/protocol/structure.rb +93 -0
  43. data/lib/pulsar_sdk/protocol/topic.rb +74 -0
  44. data/lib/pulsar_sdk/tweaks.rb +10 -0
  45. data/lib/pulsar_sdk/tweaks/assign_attributes.rb +30 -0
  46. data/lib/pulsar_sdk/tweaks/base_command.rb +66 -0
  47. data/lib/pulsar_sdk/tweaks/binary_heap.rb +133 -0
  48. data/lib/pulsar_sdk/tweaks/clean_inspect.rb +15 -0
  49. data/lib/pulsar_sdk/tweaks/time_at_microsecond.rb +27 -0
  50. data/lib/pulsar_sdk/tweaks/timeout_queue.rb +52 -0
  51. data/lib/pulsar_sdk/tweaks/wait_map.rb +81 -0
  52. data/lib/pulsar_sdk/version.rb +3 -0
  53. data/pulsar_sdk.gemspec +31 -0
  54. metadata +151 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c3cc686b5253d2e473eb208e6bf592f1e2e50165d2bcdb78c400ef4fbb458e9b
4
+ data.tar.gz: 213445db2a346003e499dbadfe7259d8aa864b1283362187de7f65ddc3cc700e
5
+ SHA512:
6
+ metadata.gz: 7439d2aa6fe4c48212d80db2bfb825fba71bb17493699931f2e9452548859893bfb9cc02c091ef14b869f6176f9d2971cb1dba519a9cc224095a41f3d8ec92d9
7
+ data.tar.gz: 5d848980f4907e02b07e7964c7a9254ec767489da72b20d15c0ee34252e9b6e171668d2b44460fd80bd613eefa287ff4c8b8b364580c246854e412ef2d582347
@@ -0,0 +1,51 @@
1
+ .idea
2
+ *.gem
3
+ *.rbc
4
+ /.config
5
+ /coverage/
6
+ /InstalledFiles
7
+ /pkg/
8
+ /spec/reports/
9
+ /spec/examples.txt
10
+ /test/tmp/
11
+ /test/version_tmp/
12
+ /tmp/
13
+
14
+ # Used by dotenv library to load environment variables.
15
+ .env
16
+
17
+ ## Specific to RubyMotion:
18
+ .dat*
19
+ .repl_history
20
+ build/
21
+ *.bridgesupport
22
+ build-iPhoneOS/
23
+ build-iPhoneSimulator/
24
+
25
+ ## Specific to RubyMotion (use of CocoaPods):
26
+ #
27
+ # We recommend against adding the Pods directory to your .gitignore. However
28
+ # you should judge for yourself, the pros and cons are mentioned at:
29
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
30
+ #
31
+ # vendor/Pods/
32
+
33
+ ## Documentation cache and generated files:
34
+ /.yardoc/
35
+ /_yardoc/
36
+ /doc/
37
+ /rdoc/
38
+
39
+ ## Environment normalization:
40
+ /.bundle/
41
+ /vendor/bundle
42
+ /lib/bundler/man/
43
+
44
+ # for a library or gem, you might want to ignore these files since the code is
45
+ # intended to run in multiple environments; otherwise, check them in:
46
+ Gemfile.lock
47
+ .ruby-version
48
+ .ruby-gemset
49
+
50
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
51
+ .rvmrc
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://gems.ruby-china.com"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in pulsar_sdk.gemspec
6
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,107 @@
1
+ # A pure ruby client for Apache Pulsar
2
+
3
+ Respecting [Pulsar binary protocol specification][2]
4
+
5
+ ## Example
6
+
7
+ See `examples`.
8
+
9
+ ## Dev
10
+
11
+ I am using Ruby 2.4 develop this gem, if not work with other Ruby version, PR is welcome.
12
+
13
+ ```shell
14
+ #!/bin/sh
15
+
16
+ PB_PATH="./lib/protobuf/"
17
+ PB_IN='pulsar_api.proto'
18
+ PB_OUT_F='pulsar_api.pb.rb'
19
+
20
+ mkdir -p ${PB_PATH}
21
+
22
+ wget -O ${PB_PATH}${PB_IN} https://raw.githubusercontent.com/apache/pulsar/master/pulsar-common/src/main/proto/PulsarApi.proto
23
+
24
+ # protoc -I ${PULSAR_GIT}/pulsar-common/src/main/proto/ --ruby_out ${PB_PATH} PulsarApi.proto
25
+ protoc -I ${PB_PATH} --ruby_out ${PB_PATH} ${PB_IN}
26
+ mv ${PB_PATH}pulsar_api_pb.rb ${PB_PATH}${PB_OUT_F}
27
+
28
+ # fix pulsar.proto.ProtocolVersion error: invalid name `v0' for constant
29
+ if [ $(uname) = 'Darwin' ]
30
+ then
31
+ suffix='.pbbak'
32
+ fi
33
+
34
+ for i in $(seq 0 15)
35
+ do
36
+ sed -i ${suffix} "s;value :v$i, $i;value :V$i, $i;g" ${PB_PATH}${PB_OUT_F}
37
+ done
38
+
39
+ rm -f ${PB_PATH}${PB_OUT_F}.pbbak
40
+
41
+ protoc -I ${PULSAR_GIT}/pulsar-common/src/main/proto/ --ruby_out ${PB_PATH} PulsarMarkers.proto
42
+ mv ${PB_PATH}PulsarMarkers_pb.rb ${PB_PATH}pulsar_markers.pb.rb
43
+ ```
44
+
45
+ ## Dependency
46
+
47
+ When macOS user install google-protobuf, there maybe a suffix with `universal-darwin` save to Gemfile.lock. Please use google-protobuf without `universal-darwin` suffix. See issuse #6 for detail. Thanks for wppurking's report!
48
+
49
+ ## Features
50
+
51
+ - [ ] Connection
52
+ - [x] Establishment
53
+ - [ ] TLS connection
54
+ - [ ] Authentication
55
+ - [ ] Producer
56
+ - [x] Message Delivery
57
+ - [x] [Delayed Message Delivery][1]
58
+ - [x] Get SendReceipt
59
+ - [x] Close Producer
60
+ - [x] Partitioned topics
61
+ - [ ] Batch Message Delivery
62
+ - [ ] Message Compression
63
+ - [ ] [Deliver message after AR transaction commit][3]
64
+ - [ ] Consumer
65
+ - [x] Flow control
66
+ - [x] Ack
67
+ - [x] Message Redelivery
68
+ - [x] Listen
69
+ - [x] Partitioned topics
70
+ - [x] Topic with regexp (in same namespace)
71
+ - [x] Topic compaction
72
+ - [ ] Reader
73
+ - [ ] [Dead Letter Topic][4]
74
+ - [ ] [Key Shared][6]
75
+ - [x] Keep alive
76
+ - [x] handle ping command
77
+ - [x] send ping command
78
+ - [x] Service discovery
79
+ - [x] Topic lookup
80
+ - [x] Log Optimization
81
+ - [x] Connection pool
82
+ - [ ] Unit Test
83
+ - [x] Thread safe
84
+ - [ ] Schema
85
+ - [ ] Get
86
+ - [ ] Create
87
+ - [ ] Admin API
88
+ - [x] Create Namespace
89
+ - [x] List namespaces in current tenant
90
+ - [x] Destroy Namespace
91
+ - [x] List Namespace Topics
92
+ - [x] Create Topic
93
+ - [x] Delete Topic
94
+ - [x] Peek Messages
95
+
96
+ ## WIP
97
+
98
+ Catch up [Pulsar client feature matrix][5], current working on:
99
+
100
+ - Dead Letter Topic
101
+
102
+ [1]: https://github.com/apache/pulsar/wiki/PIP-26%3A-Delayed-Message-Delivery "PIP 26: Delayed Message Delivery"
103
+ [2]: https://pulsar.apache.org/docs/en/develop-binary-protocol/ "Pulsar binary protocol specification"
104
+ [3]: https://github.com/Envek/after_commit_everywhere "after commit everywhere"
105
+ [4]: https://github.com/apache/pulsar/wiki/PIP-22:-Pulsar-Dead-Letter-Topic "PIP 22: Pulsar Dead Letter Topic"
106
+ [5]: https://github.com/apache/pulsar/wiki/Client-Features-Matrix "Pulsar client feature matrix"
107
+ [6]: https://pulsar.apache.org/docs/en/concepts-messaging/#key_shared "consumer key_shared mode"
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "pulsar_sdk"
5
+ require "pulsar_admin"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,710 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: pulsar_api.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("pulsar_api.proto", :syntax => :proto2) do
8
+ add_message "pulsar.proto.Schema" do
9
+ required :name, :string, 1
10
+ required :schema_data, :bytes, 3
11
+ required :type, :enum, 4, "pulsar.proto.Schema.Type"
12
+ repeated :properties, :message, 5, "pulsar.proto.KeyValue"
13
+ end
14
+ add_enum "pulsar.proto.Schema.Type" do
15
+ value :None, 0
16
+ value :String, 1
17
+ value :Json, 2
18
+ value :Protobuf, 3
19
+ value :Avro, 4
20
+ value :Bool, 5
21
+ value :Int8, 6
22
+ value :Int16, 7
23
+ value :Int32, 8
24
+ value :Int64, 9
25
+ value :Float, 10
26
+ value :Double, 11
27
+ value :Date, 12
28
+ value :Time, 13
29
+ value :Timestamp, 14
30
+ value :KeyValue, 15
31
+ end
32
+ add_message "pulsar.proto.MessageIdData" do
33
+ required :ledgerId, :uint64, 1
34
+ required :entryId, :uint64, 2
35
+ optional :partition, :int32, 3, default: -1
36
+ optional :batch_index, :int32, 4, default: -1
37
+ end
38
+ add_message "pulsar.proto.KeyValue" do
39
+ required :key, :string, 1
40
+ required :value, :string, 2
41
+ end
42
+ add_message "pulsar.proto.KeyLongValue" do
43
+ required :key, :string, 1
44
+ required :value, :uint64, 2
45
+ end
46
+ add_message "pulsar.proto.IntRange" do
47
+ required :start, :int32, 1
48
+ required :end, :int32, 2
49
+ end
50
+ add_message "pulsar.proto.EncryptionKeys" do
51
+ required :key, :string, 1
52
+ required :value, :bytes, 2
53
+ repeated :metadata, :message, 3, "pulsar.proto.KeyValue"
54
+ end
55
+ add_message "pulsar.proto.MessageMetadata" do
56
+ required :producer_name, :string, 1
57
+ required :sequence_id, :uint64, 2
58
+ required :publish_time, :uint64, 3
59
+ repeated :properties, :message, 4, "pulsar.proto.KeyValue"
60
+ optional :replicated_from, :string, 5
61
+ optional :partition_key, :string, 6
62
+ repeated :replicate_to, :string, 7
63
+ optional :compression, :enum, 8, "pulsar.proto.CompressionType", default: 0
64
+ optional :uncompressed_size, :uint32, 9, default: 0
65
+ optional :num_messages_in_batch, :int32, 11, default: 1
66
+ optional :event_time, :uint64, 12, default: 0
67
+ repeated :encryption_keys, :message, 13, "pulsar.proto.EncryptionKeys"
68
+ optional :encryption_algo, :string, 14
69
+ optional :encryption_param, :bytes, 15
70
+ optional :schema_version, :bytes, 16
71
+ optional :partition_key_b64_encoded, :bool, 17, default: false
72
+ optional :ordering_key, :bytes, 18
73
+ optional :deliver_at_time, :int64, 19
74
+ optional :marker_type, :int32, 20
75
+ optional :txnid_least_bits, :uint64, 22, default: 0
76
+ optional :txnid_most_bits, :uint64, 23, default: 0
77
+ optional :highest_sequence_id, :uint64, 24, default: 0
78
+ end
79
+ add_message "pulsar.proto.SingleMessageMetadata" do
80
+ repeated :properties, :message, 1, "pulsar.proto.KeyValue"
81
+ optional :partition_key, :string, 2
82
+ required :payload_size, :int32, 3
83
+ optional :compacted_out, :bool, 4, default: false
84
+ optional :event_time, :uint64, 5, default: 0
85
+ optional :partition_key_b64_encoded, :bool, 6, default: false
86
+ optional :ordering_key, :bytes, 7
87
+ optional :sequence_id, :uint64, 8
88
+ end
89
+ add_message "pulsar.proto.CommandConnect" do
90
+ required :client_version, :string, 1
91
+ optional :auth_method, :enum, 2, "pulsar.proto.AuthMethod"
92
+ optional :auth_method_name, :string, 5
93
+ optional :auth_data, :bytes, 3
94
+ optional :protocol_version, :int32, 4, default: 0
95
+ optional :proxy_to_broker_url, :string, 6
96
+ optional :original_principal, :string, 7
97
+ optional :original_auth_data, :string, 8
98
+ optional :original_auth_method, :string, 9
99
+ end
100
+ add_message "pulsar.proto.CommandConnected" do
101
+ required :server_version, :string, 1
102
+ optional :protocol_version, :int32, 2, default: 0
103
+ optional :max_message_size, :int32, 3
104
+ end
105
+ add_message "pulsar.proto.CommandAuthResponse" do
106
+ optional :client_version, :string, 1
107
+ optional :response, :message, 2, "pulsar.proto.AuthData"
108
+ optional :protocol_version, :int32, 3, default: 0
109
+ end
110
+ add_message "pulsar.proto.CommandAuthChallenge" do
111
+ optional :server_version, :string, 1
112
+ optional :challenge, :message, 2, "pulsar.proto.AuthData"
113
+ optional :protocol_version, :int32, 3, default: 0
114
+ end
115
+ add_message "pulsar.proto.AuthData" do
116
+ optional :auth_method_name, :string, 1
117
+ optional :auth_data, :bytes, 2
118
+ end
119
+ add_message "pulsar.proto.KeySharedMeta" do
120
+ required :keySharedMode, :enum, 1, "pulsar.proto.KeySharedMode"
121
+ repeated :hashRanges, :message, 3, "pulsar.proto.IntRange"
122
+ end
123
+ add_message "pulsar.proto.CommandSubscribe" do
124
+ required :topic, :string, 1
125
+ required :subscription, :string, 2
126
+ required :subType, :enum, 3, "pulsar.proto.CommandSubscribe.SubType"
127
+ required :consumer_id, :uint64, 4
128
+ required :request_id, :uint64, 5
129
+ optional :consumer_name, :string, 6
130
+ optional :priority_level, :int32, 7
131
+ optional :durable, :bool, 8, default: true
132
+ optional :start_message_id, :message, 9, "pulsar.proto.MessageIdData"
133
+ repeated :metadata, :message, 10, "pulsar.proto.KeyValue"
134
+ optional :read_compacted, :bool, 11
135
+ optional :schema, :message, 12, "pulsar.proto.Schema"
136
+ optional :initialPosition, :enum, 13, "pulsar.proto.CommandSubscribe.InitialPosition", default: 0
137
+ optional :replicate_subscription_state, :bool, 14
138
+ optional :force_topic_creation, :bool, 15, default: true
139
+ optional :start_message_rollback_duration_sec, :uint64, 16, default: 0
140
+ optional :keySharedMeta, :message, 17, "pulsar.proto.KeySharedMeta"
141
+ end
142
+ add_enum "pulsar.proto.CommandSubscribe.SubType" do
143
+ value :Exclusive, 0
144
+ value :Shared, 1
145
+ value :Failover, 2
146
+ value :Key_Shared, 3
147
+ end
148
+ add_enum "pulsar.proto.CommandSubscribe.InitialPosition" do
149
+ value :Latest, 0
150
+ value :Earliest, 1
151
+ end
152
+ add_message "pulsar.proto.CommandPartitionedTopicMetadata" do
153
+ required :topic, :string, 1
154
+ required :request_id, :uint64, 2
155
+ optional :original_principal, :string, 3
156
+ optional :original_auth_data, :string, 4
157
+ optional :original_auth_method, :string, 5
158
+ end
159
+ add_message "pulsar.proto.CommandPartitionedTopicMetadataResponse" do
160
+ optional :partitions, :uint32, 1
161
+ required :request_id, :uint64, 2
162
+ optional :response, :enum, 3, "pulsar.proto.CommandPartitionedTopicMetadataResponse.LookupType"
163
+ optional :error, :enum, 4, "pulsar.proto.ServerError"
164
+ optional :message, :string, 5
165
+ end
166
+ add_enum "pulsar.proto.CommandPartitionedTopicMetadataResponse.LookupType" do
167
+ value :Success, 0
168
+ value :Failed, 1
169
+ end
170
+ add_message "pulsar.proto.CommandLookupTopic" do
171
+ required :topic, :string, 1
172
+ required :request_id, :uint64, 2
173
+ optional :authoritative, :bool, 3, default: false
174
+ optional :original_principal, :string, 4
175
+ optional :original_auth_data, :string, 5
176
+ optional :original_auth_method, :string, 6
177
+ end
178
+ add_message "pulsar.proto.CommandLookupTopicResponse" do
179
+ optional :brokerServiceUrl, :string, 1
180
+ optional :brokerServiceUrlTls, :string, 2
181
+ optional :response, :enum, 3, "pulsar.proto.CommandLookupTopicResponse.LookupType"
182
+ required :request_id, :uint64, 4
183
+ optional :authoritative, :bool, 5, default: false
184
+ optional :error, :enum, 6, "pulsar.proto.ServerError"
185
+ optional :message, :string, 7
186
+ optional :proxy_through_service_url, :bool, 8, default: false
187
+ end
188
+ add_enum "pulsar.proto.CommandLookupTopicResponse.LookupType" do
189
+ value :Redirect, 0
190
+ value :Connect, 1
191
+ value :Failed, 2
192
+ end
193
+ add_message "pulsar.proto.CommandProducer" do
194
+ required :topic, :string, 1
195
+ required :producer_id, :uint64, 2
196
+ required :request_id, :uint64, 3
197
+ optional :producer_name, :string, 4
198
+ optional :encrypted, :bool, 5, default: false
199
+ repeated :metadata, :message, 6, "pulsar.proto.KeyValue"
200
+ optional :schema, :message, 7, "pulsar.proto.Schema"
201
+ optional :epoch, :uint64, 8, default: 0
202
+ optional :user_provided_producer_name, :bool, 9, default: true
203
+ end
204
+ add_message "pulsar.proto.CommandSend" do
205
+ required :producer_id, :uint64, 1
206
+ required :sequence_id, :uint64, 2
207
+ optional :num_messages, :int32, 3, default: 1
208
+ optional :txnid_least_bits, :uint64, 4, default: 0
209
+ optional :txnid_most_bits, :uint64, 5, default: 0
210
+ optional :highest_sequence_id, :uint64, 6, default: 0
211
+ end
212
+ add_message "pulsar.proto.CommandSendReceipt" do
213
+ required :producer_id, :uint64, 1
214
+ required :sequence_id, :uint64, 2
215
+ optional :message_id, :message, 3, "pulsar.proto.MessageIdData"
216
+ optional :highest_sequence_id, :uint64, 4, default: 0
217
+ end
218
+ add_message "pulsar.proto.CommandSendError" do
219
+ required :producer_id, :uint64, 1
220
+ required :sequence_id, :uint64, 2
221
+ required :error, :enum, 3, "pulsar.proto.ServerError"
222
+ required :message, :string, 4
223
+ end
224
+ add_message "pulsar.proto.CommandMessage" do
225
+ required :consumer_id, :uint64, 1
226
+ required :message_id, :message, 2, "pulsar.proto.MessageIdData"
227
+ optional :redelivery_count, :uint32, 3, default: 0
228
+ end
229
+ add_message "pulsar.proto.CommandAck" do
230
+ required :consumer_id, :uint64, 1
231
+ required :ack_type, :enum, 2, "pulsar.proto.CommandAck.AckType"
232
+ repeated :message_id, :message, 3, "pulsar.proto.MessageIdData"
233
+ optional :validation_error, :enum, 4, "pulsar.proto.CommandAck.ValidationError"
234
+ repeated :properties, :message, 5, "pulsar.proto.KeyLongValue"
235
+ optional :txnid_least_bits, :uint64, 6, default: 0
236
+ optional :txnid_most_bits, :uint64, 7, default: 0
237
+ end
238
+ add_enum "pulsar.proto.CommandAck.AckType" do
239
+ value :Individual, 0
240
+ value :Cumulative, 1
241
+ end
242
+ add_enum "pulsar.proto.CommandAck.ValidationError" do
243
+ value :UncompressedSizeCorruption, 0
244
+ value :DecompressionError, 1
245
+ value :ChecksumMismatch, 2
246
+ value :BatchDeSerializeError, 3
247
+ value :DecryptionError, 4
248
+ end
249
+ add_message "pulsar.proto.CommandAckResponse" do
250
+ required :consumer_id, :uint64, 1
251
+ optional :txnid_least_bits, :uint64, 2, default: 0
252
+ optional :txnid_most_bits, :uint64, 3, default: 0
253
+ optional :error, :enum, 4, "pulsar.proto.ServerError"
254
+ optional :message, :string, 5
255
+ end
256
+ add_message "pulsar.proto.CommandActiveConsumerChange" do
257
+ required :consumer_id, :uint64, 1
258
+ optional :is_active, :bool, 2, default: false
259
+ end
260
+ add_message "pulsar.proto.CommandFlow" do
261
+ required :consumer_id, :uint64, 1
262
+ required :messagePermits, :uint32, 2
263
+ end
264
+ add_message "pulsar.proto.CommandUnsubscribe" do
265
+ required :consumer_id, :uint64, 1
266
+ required :request_id, :uint64, 2
267
+ end
268
+ add_message "pulsar.proto.CommandSeek" do
269
+ required :consumer_id, :uint64, 1
270
+ required :request_id, :uint64, 2
271
+ optional :message_id, :message, 3, "pulsar.proto.MessageIdData"
272
+ optional :message_publish_time, :uint64, 4
273
+ end
274
+ add_message "pulsar.proto.CommandReachedEndOfTopic" do
275
+ required :consumer_id, :uint64, 1
276
+ end
277
+ add_message "pulsar.proto.CommandCloseProducer" do
278
+ required :producer_id, :uint64, 1
279
+ required :request_id, :uint64, 2
280
+ end
281
+ add_message "pulsar.proto.CommandCloseConsumer" do
282
+ required :consumer_id, :uint64, 1
283
+ required :request_id, :uint64, 2
284
+ end
285
+ add_message "pulsar.proto.CommandRedeliverUnacknowledgedMessages" do
286
+ required :consumer_id, :uint64, 1
287
+ repeated :message_ids, :message, 2, "pulsar.proto.MessageIdData"
288
+ end
289
+ add_message "pulsar.proto.CommandSuccess" do
290
+ required :request_id, :uint64, 1
291
+ optional :schema, :message, 2, "pulsar.proto.Schema"
292
+ end
293
+ add_message "pulsar.proto.CommandProducerSuccess" do
294
+ required :request_id, :uint64, 1
295
+ required :producer_name, :string, 2
296
+ optional :last_sequence_id, :int64, 3, default: -1
297
+ optional :schema_version, :bytes, 4
298
+ end
299
+ add_message "pulsar.proto.CommandError" do
300
+ required :request_id, :uint64, 1
301
+ required :error, :enum, 2, "pulsar.proto.ServerError"
302
+ required :message, :string, 3
303
+ end
304
+ add_message "pulsar.proto.CommandPing" do
305
+ end
306
+ add_message "pulsar.proto.CommandPong" do
307
+ end
308
+ add_message "pulsar.proto.CommandConsumerStats" do
309
+ required :request_id, :uint64, 1
310
+ required :consumer_id, :uint64, 4
311
+ end
312
+ add_message "pulsar.proto.CommandConsumerStatsResponse" do
313
+ required :request_id, :uint64, 1
314
+ optional :error_code, :enum, 2, "pulsar.proto.ServerError"
315
+ optional :error_message, :string, 3
316
+ optional :msgRateOut, :double, 4
317
+ optional :msgThroughputOut, :double, 5
318
+ optional :msgRateRedeliver, :double, 6
319
+ optional :consumerName, :string, 7
320
+ optional :availablePermits, :uint64, 8
321
+ optional :unackedMessages, :uint64, 9
322
+ optional :blockedConsumerOnUnackedMsgs, :bool, 10
323
+ optional :address, :string, 11
324
+ optional :connectedSince, :string, 12
325
+ optional :type, :string, 13
326
+ optional :msgRateExpired, :double, 14
327
+ optional :msgBacklog, :uint64, 15
328
+ end
329
+ add_message "pulsar.proto.CommandGetLastMessageId" do
330
+ required :consumer_id, :uint64, 1
331
+ required :request_id, :uint64, 2
332
+ end
333
+ add_message "pulsar.proto.CommandGetLastMessageIdResponse" do
334
+ required :last_message_id, :message, 1, "pulsar.proto.MessageIdData"
335
+ required :request_id, :uint64, 2
336
+ end
337
+ add_message "pulsar.proto.CommandGetTopicsOfNamespace" do
338
+ required :request_id, :uint64, 1
339
+ required :namespace, :string, 2
340
+ optional :mode, :enum, 3, "pulsar.proto.CommandGetTopicsOfNamespace.Mode", default: 0
341
+ end
342
+ add_enum "pulsar.proto.CommandGetTopicsOfNamespace.Mode" do
343
+ value :PERSISTENT, 0
344
+ value :NON_PERSISTENT, 1
345
+ value :ALL, 2
346
+ end
347
+ add_message "pulsar.proto.CommandGetTopicsOfNamespaceResponse" do
348
+ required :request_id, :uint64, 1
349
+ repeated :topics, :string, 2
350
+ end
351
+ add_message "pulsar.proto.CommandGetSchema" do
352
+ required :request_id, :uint64, 1
353
+ required :topic, :string, 2
354
+ optional :schema_version, :bytes, 3
355
+ end
356
+ add_message "pulsar.proto.CommandGetSchemaResponse" do
357
+ required :request_id, :uint64, 1
358
+ optional :error_code, :enum, 2, "pulsar.proto.ServerError"
359
+ optional :error_message, :string, 3
360
+ optional :schema, :message, 4, "pulsar.proto.Schema"
361
+ optional :schema_version, :bytes, 5
362
+ end
363
+ add_message "pulsar.proto.CommandGetOrCreateSchema" do
364
+ required :request_id, :uint64, 1
365
+ required :topic, :string, 2
366
+ required :schema, :message, 3, "pulsar.proto.Schema"
367
+ end
368
+ add_message "pulsar.proto.CommandGetOrCreateSchemaResponse" do
369
+ required :request_id, :uint64, 1
370
+ optional :error_code, :enum, 2, "pulsar.proto.ServerError"
371
+ optional :error_message, :string, 3
372
+ optional :schema_version, :bytes, 4
373
+ end
374
+ add_message "pulsar.proto.CommandNewTxn" do
375
+ required :request_id, :uint64, 1
376
+ optional :txn_ttl_seconds, :uint64, 2, default: 0
377
+ optional :tc_id, :uint64, 3, default: 0
378
+ end
379
+ add_message "pulsar.proto.CommandNewTxnResponse" do
380
+ required :request_id, :uint64, 1
381
+ optional :txnid_least_bits, :uint64, 2, default: 0
382
+ optional :txnid_most_bits, :uint64, 3, default: 0
383
+ optional :error, :enum, 4, "pulsar.proto.ServerError"
384
+ optional :message, :string, 5
385
+ end
386
+ add_message "pulsar.proto.CommandAddPartitionToTxn" do
387
+ required :request_id, :uint64, 1
388
+ optional :txnid_least_bits, :uint64, 2, default: 0
389
+ optional :txnid_most_bits, :uint64, 3, default: 0
390
+ repeated :partitions, :string, 4
391
+ end
392
+ add_message "pulsar.proto.CommandAddPartitionToTxnResponse" do
393
+ required :request_id, :uint64, 1
394
+ optional :txnid_least_bits, :uint64, 2, default: 0
395
+ optional :txnid_most_bits, :uint64, 3, default: 0
396
+ optional :error, :enum, 4, "pulsar.proto.ServerError"
397
+ optional :message, :string, 5
398
+ end
399
+ add_message "pulsar.proto.Subscription" do
400
+ required :topic, :string, 1
401
+ required :subscription, :string, 2
402
+ end
403
+ add_message "pulsar.proto.CommandAddSubscriptionToTxn" do
404
+ required :request_id, :uint64, 1
405
+ optional :txnid_least_bits, :uint64, 2, default: 0
406
+ optional :txnid_most_bits, :uint64, 3, default: 0
407
+ repeated :subscription, :message, 4, "pulsar.proto.Subscription"
408
+ end
409
+ add_message "pulsar.proto.CommandAddSubscriptionToTxnResponse" do
410
+ required :request_id, :uint64, 1
411
+ optional :txnid_least_bits, :uint64, 2, default: 0
412
+ optional :txnid_most_bits, :uint64, 3, default: 0
413
+ optional :error, :enum, 4, "pulsar.proto.ServerError"
414
+ optional :message, :string, 5
415
+ end
416
+ add_message "pulsar.proto.CommandEndTxn" do
417
+ required :request_id, :uint64, 1
418
+ optional :txnid_least_bits, :uint64, 2, default: 0
419
+ optional :txnid_most_bits, :uint64, 3, default: 0
420
+ optional :txn_action, :enum, 4, "pulsar.proto.TxnAction"
421
+ end
422
+ add_message "pulsar.proto.CommandEndTxnResponse" do
423
+ required :request_id, :uint64, 1
424
+ optional :txnid_least_bits, :uint64, 2, default: 0
425
+ optional :txnid_most_bits, :uint64, 3, default: 0
426
+ optional :error, :enum, 4, "pulsar.proto.ServerError"
427
+ optional :message, :string, 5
428
+ end
429
+ add_message "pulsar.proto.CommandEndTxnOnPartition" do
430
+ required :request_id, :uint64, 1
431
+ optional :txnid_least_bits, :uint64, 2, default: 0
432
+ optional :txnid_most_bits, :uint64, 3, default: 0
433
+ optional :topic, :string, 4
434
+ optional :txn_action, :enum, 5, "pulsar.proto.TxnAction"
435
+ end
436
+ add_message "pulsar.proto.CommandEndTxnOnPartitionResponse" do
437
+ required :request_id, :uint64, 1
438
+ optional :txnid_least_bits, :uint64, 2, default: 0
439
+ optional :txnid_most_bits, :uint64, 3, default: 0
440
+ optional :error, :enum, 4, "pulsar.proto.ServerError"
441
+ optional :message, :string, 5
442
+ end
443
+ add_message "pulsar.proto.CommandEndTxnOnSubscription" do
444
+ required :request_id, :uint64, 1
445
+ optional :txnid_least_bits, :uint64, 2, default: 0
446
+ optional :txnid_most_bits, :uint64, 3, default: 0
447
+ optional :subscription, :message, 4, "pulsar.proto.Subscription"
448
+ optional :txn_action, :enum, 5, "pulsar.proto.TxnAction"
449
+ end
450
+ add_message "pulsar.proto.CommandEndTxnOnSubscriptionResponse" do
451
+ required :request_id, :uint64, 1
452
+ optional :txnid_least_bits, :uint64, 2, default: 0
453
+ optional :txnid_most_bits, :uint64, 3, default: 0
454
+ optional :error, :enum, 4, "pulsar.proto.ServerError"
455
+ optional :message, :string, 5
456
+ end
457
+ add_message "pulsar.proto.BaseCommand" do
458
+ required :type, :enum, 1, "pulsar.proto.BaseCommand.Type"
459
+ optional :connect, :message, 2, "pulsar.proto.CommandConnect"
460
+ optional :connected, :message, 3, "pulsar.proto.CommandConnected"
461
+ optional :subscribe, :message, 4, "pulsar.proto.CommandSubscribe"
462
+ optional :producer, :message, 5, "pulsar.proto.CommandProducer"
463
+ optional :send, :message, 6, "pulsar.proto.CommandSend"
464
+ optional :send_receipt, :message, 7, "pulsar.proto.CommandSendReceipt"
465
+ optional :send_error, :message, 8, "pulsar.proto.CommandSendError"
466
+ optional :message, :message, 9, "pulsar.proto.CommandMessage"
467
+ optional :ack, :message, 10, "pulsar.proto.CommandAck"
468
+ optional :flow, :message, 11, "pulsar.proto.CommandFlow"
469
+ optional :unsubscribe, :message, 12, "pulsar.proto.CommandUnsubscribe"
470
+ optional :success, :message, 13, "pulsar.proto.CommandSuccess"
471
+ optional :error, :message, 14, "pulsar.proto.CommandError"
472
+ optional :close_producer, :message, 15, "pulsar.proto.CommandCloseProducer"
473
+ optional :close_consumer, :message, 16, "pulsar.proto.CommandCloseConsumer"
474
+ optional :producer_success, :message, 17, "pulsar.proto.CommandProducerSuccess"
475
+ optional :ping, :message, 18, "pulsar.proto.CommandPing"
476
+ optional :pong, :message, 19, "pulsar.proto.CommandPong"
477
+ optional :redeliverUnacknowledgedMessages, :message, 20, "pulsar.proto.CommandRedeliverUnacknowledgedMessages"
478
+ optional :partitionMetadata, :message, 21, "pulsar.proto.CommandPartitionedTopicMetadata"
479
+ optional :partitionMetadataResponse, :message, 22, "pulsar.proto.CommandPartitionedTopicMetadataResponse"
480
+ optional :lookupTopic, :message, 23, "pulsar.proto.CommandLookupTopic"
481
+ optional :lookupTopicResponse, :message, 24, "pulsar.proto.CommandLookupTopicResponse"
482
+ optional :consumerStats, :message, 25, "pulsar.proto.CommandConsumerStats"
483
+ optional :consumerStatsResponse, :message, 26, "pulsar.proto.CommandConsumerStatsResponse"
484
+ optional :reachedEndOfTopic, :message, 27, "pulsar.proto.CommandReachedEndOfTopic"
485
+ optional :seek, :message, 28, "pulsar.proto.CommandSeek"
486
+ optional :getLastMessageId, :message, 29, "pulsar.proto.CommandGetLastMessageId"
487
+ optional :getLastMessageIdResponse, :message, 30, "pulsar.proto.CommandGetLastMessageIdResponse"
488
+ optional :active_consumer_change, :message, 31, "pulsar.proto.CommandActiveConsumerChange"
489
+ optional :getTopicsOfNamespace, :message, 32, "pulsar.proto.CommandGetTopicsOfNamespace"
490
+ optional :getTopicsOfNamespaceResponse, :message, 33, "pulsar.proto.CommandGetTopicsOfNamespaceResponse"
491
+ optional :getSchema, :message, 34, "pulsar.proto.CommandGetSchema"
492
+ optional :getSchemaResponse, :message, 35, "pulsar.proto.CommandGetSchemaResponse"
493
+ optional :authChallenge, :message, 36, "pulsar.proto.CommandAuthChallenge"
494
+ optional :authResponse, :message, 37, "pulsar.proto.CommandAuthResponse"
495
+ optional :ackResponse, :message, 38, "pulsar.proto.CommandAckResponse"
496
+ optional :getOrCreateSchema, :message, 39, "pulsar.proto.CommandGetOrCreateSchema"
497
+ optional :getOrCreateSchemaResponse, :message, 40, "pulsar.proto.CommandGetOrCreateSchemaResponse"
498
+ optional :newTxn, :message, 50, "pulsar.proto.CommandNewTxn"
499
+ optional :newTxnResponse, :message, 51, "pulsar.proto.CommandNewTxnResponse"
500
+ optional :addPartitionToTxn, :message, 52, "pulsar.proto.CommandAddPartitionToTxn"
501
+ optional :addPartitionToTxnResponse, :message, 53, "pulsar.proto.CommandAddPartitionToTxnResponse"
502
+ optional :addSubscriptionToTxn, :message, 54, "pulsar.proto.CommandAddSubscriptionToTxn"
503
+ optional :addSubscriptionToTxnResponse, :message, 55, "pulsar.proto.CommandAddSubscriptionToTxnResponse"
504
+ optional :endTxn, :message, 56, "pulsar.proto.CommandEndTxn"
505
+ optional :endTxnResponse, :message, 57, "pulsar.proto.CommandEndTxnResponse"
506
+ optional :endTxnOnPartition, :message, 58, "pulsar.proto.CommandEndTxnOnPartition"
507
+ optional :endTxnOnPartitionResponse, :message, 59, "pulsar.proto.CommandEndTxnOnPartitionResponse"
508
+ optional :endTxnOnSubscription, :message, 60, "pulsar.proto.CommandEndTxnOnSubscription"
509
+ optional :endTxnOnSubscriptionResponse, :message, 61, "pulsar.proto.CommandEndTxnOnSubscriptionResponse"
510
+ end
511
+ add_enum "pulsar.proto.BaseCommand.Type" do
512
+ value :CONNECT, 2
513
+ value :CONNECTED, 3
514
+ value :SUBSCRIBE, 4
515
+ value :PRODUCER, 5
516
+ value :SEND, 6
517
+ value :SEND_RECEIPT, 7
518
+ value :SEND_ERROR, 8
519
+ value :MESSAGE, 9
520
+ value :ACK, 10
521
+ value :FLOW, 11
522
+ value :UNSUBSCRIBE, 12
523
+ value :SUCCESS, 13
524
+ value :ERROR, 14
525
+ value :CLOSE_PRODUCER, 15
526
+ value :CLOSE_CONSUMER, 16
527
+ value :PRODUCER_SUCCESS, 17
528
+ value :PING, 18
529
+ value :PONG, 19
530
+ value :REDELIVER_UNACKNOWLEDGED_MESSAGES, 20
531
+ value :PARTITIONED_METADATA, 21
532
+ value :PARTITIONED_METADATA_RESPONSE, 22
533
+ value :LOOKUP, 23
534
+ value :LOOKUP_RESPONSE, 24
535
+ value :CONSUMER_STATS, 25
536
+ value :CONSUMER_STATS_RESPONSE, 26
537
+ value :REACHED_END_OF_TOPIC, 27
538
+ value :SEEK, 28
539
+ value :GET_LAST_MESSAGE_ID, 29
540
+ value :GET_LAST_MESSAGE_ID_RESPONSE, 30
541
+ value :ACTIVE_CONSUMER_CHANGE, 31
542
+ value :GET_TOPICS_OF_NAMESPACE, 32
543
+ value :GET_TOPICS_OF_NAMESPACE_RESPONSE, 33
544
+ value :GET_SCHEMA, 34
545
+ value :GET_SCHEMA_RESPONSE, 35
546
+ value :AUTH_CHALLENGE, 36
547
+ value :AUTH_RESPONSE, 37
548
+ value :ACK_RESPONSE, 38
549
+ value :GET_OR_CREATE_SCHEMA, 39
550
+ value :GET_OR_CREATE_SCHEMA_RESPONSE, 40
551
+ value :NEW_TXN, 50
552
+ value :NEW_TXN_RESPONSE, 51
553
+ value :ADD_PARTITION_TO_TXN, 52
554
+ value :ADD_PARTITION_TO_TXN_RESPONSE, 53
555
+ value :ADD_SUBSCRIPTION_TO_TXN, 54
556
+ value :ADD_SUBSCRIPTION_TO_TXN_RESPONSE, 55
557
+ value :END_TXN, 56
558
+ value :END_TXN_RESPONSE, 57
559
+ value :END_TXN_ON_PARTITION, 58
560
+ value :END_TXN_ON_PARTITION_RESPONSE, 59
561
+ value :END_TXN_ON_SUBSCRIPTION, 60
562
+ value :END_TXN_ON_SUBSCRIPTION_RESPONSE, 61
563
+ end
564
+ add_enum "pulsar.proto.CompressionType" do
565
+ value :NONE, 0
566
+ value :LZ4, 1
567
+ value :ZLIB, 2
568
+ value :ZSTD, 3
569
+ value :SNAPPY, 4
570
+ end
571
+ add_enum "pulsar.proto.ServerError" do
572
+ value :UnknownError, 0
573
+ value :MetadataError, 1
574
+ value :PersistenceError, 2
575
+ value :AuthenticationError, 3
576
+ value :AuthorizationError, 4
577
+ value :ConsumerBusy, 5
578
+ value :ServiceNotReady, 6
579
+ value :ProducerBlockedQuotaExceededError, 7
580
+ value :ProducerBlockedQuotaExceededException, 8
581
+ value :ChecksumError, 9
582
+ value :UnsupportedVersionError, 10
583
+ value :TopicNotFound, 11
584
+ value :SubscriptionNotFound, 12
585
+ value :ConsumerNotFound, 13
586
+ value :TooManyRequests, 14
587
+ value :TopicTerminatedError, 15
588
+ value :ProducerBusy, 16
589
+ value :InvalidTopicName, 17
590
+ value :IncompatibleSchema, 18
591
+ value :ConsumerAssignError, 19
592
+ value :TransactionCoordinatorNotFound, 20
593
+ value :InvalidTxnStatus, 21
594
+ end
595
+ add_enum "pulsar.proto.AuthMethod" do
596
+ value :AuthMethodNone, 0
597
+ value :AuthMethodYcaV1, 1
598
+ value :AuthMethodAthens, 2
599
+ end
600
+ add_enum "pulsar.proto.ProtocolVersion" do
601
+ value :V0, 0
602
+ value :V1, 1
603
+ value :V2, 2
604
+ value :V3, 3
605
+ value :V4, 4
606
+ value :V5, 5
607
+ value :V6, 6
608
+ value :V7, 7
609
+ value :V8, 8
610
+ value :V9, 9
611
+ value :V10, 10
612
+ value :V11, 11
613
+ value :V12, 12
614
+ value :V13, 13
615
+ value :V14, 14
616
+ value :V15, 15
617
+ end
618
+ add_enum "pulsar.proto.KeySharedMode" do
619
+ value :AUTO_SPLIT, 0
620
+ value :STICKY, 1
621
+ end
622
+ add_enum "pulsar.proto.TxnAction" do
623
+ value :COMMIT, 0
624
+ value :ABORT, 1
625
+ end
626
+ end
627
+ end
628
+
629
+ module Pulsar
630
+ module Proto
631
+ Schema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.Schema").msgclass
632
+ Schema::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.Schema.Type").enummodule
633
+ MessageIdData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.MessageIdData").msgclass
634
+ KeyValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.KeyValue").msgclass
635
+ KeyLongValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.KeyLongValue").msgclass
636
+ IntRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.IntRange").msgclass
637
+ EncryptionKeys = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.EncryptionKeys").msgclass
638
+ MessageMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.MessageMetadata").msgclass
639
+ SingleMessageMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.SingleMessageMetadata").msgclass
640
+ CommandConnect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandConnect").msgclass
641
+ CommandConnected = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandConnected").msgclass
642
+ CommandAuthResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandAuthResponse").msgclass
643
+ CommandAuthChallenge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandAuthChallenge").msgclass
644
+ AuthData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.AuthData").msgclass
645
+ KeySharedMeta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.KeySharedMeta").msgclass
646
+ CommandSubscribe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandSubscribe").msgclass
647
+ CommandSubscribe::SubType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandSubscribe.SubType").enummodule
648
+ CommandSubscribe::InitialPosition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandSubscribe.InitialPosition").enummodule
649
+ CommandPartitionedTopicMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandPartitionedTopicMetadata").msgclass
650
+ CommandPartitionedTopicMetadataResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandPartitionedTopicMetadataResponse").msgclass
651
+ CommandPartitionedTopicMetadataResponse::LookupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandPartitionedTopicMetadataResponse.LookupType").enummodule
652
+ CommandLookupTopic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandLookupTopic").msgclass
653
+ CommandLookupTopicResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandLookupTopicResponse").msgclass
654
+ CommandLookupTopicResponse::LookupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandLookupTopicResponse.LookupType").enummodule
655
+ CommandProducer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandProducer").msgclass
656
+ CommandSend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandSend").msgclass
657
+ CommandSendReceipt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandSendReceipt").msgclass
658
+ CommandSendError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandSendError").msgclass
659
+ CommandMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandMessage").msgclass
660
+ CommandAck = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandAck").msgclass
661
+ CommandAck::AckType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandAck.AckType").enummodule
662
+ CommandAck::ValidationError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandAck.ValidationError").enummodule
663
+ CommandAckResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandAckResponse").msgclass
664
+ CommandActiveConsumerChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandActiveConsumerChange").msgclass
665
+ CommandFlow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandFlow").msgclass
666
+ CommandUnsubscribe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandUnsubscribe").msgclass
667
+ CommandSeek = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandSeek").msgclass
668
+ CommandReachedEndOfTopic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandReachedEndOfTopic").msgclass
669
+ CommandCloseProducer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandCloseProducer").msgclass
670
+ CommandCloseConsumer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandCloseConsumer").msgclass
671
+ CommandRedeliverUnacknowledgedMessages = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandRedeliverUnacknowledgedMessages").msgclass
672
+ CommandSuccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandSuccess").msgclass
673
+ CommandProducerSuccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandProducerSuccess").msgclass
674
+ CommandError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandError").msgclass
675
+ CommandPing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandPing").msgclass
676
+ CommandPong = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandPong").msgclass
677
+ CommandConsumerStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandConsumerStats").msgclass
678
+ CommandConsumerStatsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandConsumerStatsResponse").msgclass
679
+ CommandGetLastMessageId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandGetLastMessageId").msgclass
680
+ CommandGetLastMessageIdResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandGetLastMessageIdResponse").msgclass
681
+ CommandGetTopicsOfNamespace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandGetTopicsOfNamespace").msgclass
682
+ CommandGetTopicsOfNamespace::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandGetTopicsOfNamespace.Mode").enummodule
683
+ CommandGetTopicsOfNamespaceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandGetTopicsOfNamespaceResponse").msgclass
684
+ CommandGetSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandGetSchema").msgclass
685
+ CommandGetSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandGetSchemaResponse").msgclass
686
+ CommandGetOrCreateSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandGetOrCreateSchema").msgclass
687
+ CommandGetOrCreateSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandGetOrCreateSchemaResponse").msgclass
688
+ CommandNewTxn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandNewTxn").msgclass
689
+ CommandNewTxnResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandNewTxnResponse").msgclass
690
+ CommandAddPartitionToTxn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandAddPartitionToTxn").msgclass
691
+ CommandAddPartitionToTxnResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandAddPartitionToTxnResponse").msgclass
692
+ Subscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.Subscription").msgclass
693
+ CommandAddSubscriptionToTxn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandAddSubscriptionToTxn").msgclass
694
+ CommandAddSubscriptionToTxnResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandAddSubscriptionToTxnResponse").msgclass
695
+ CommandEndTxn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandEndTxn").msgclass
696
+ CommandEndTxnResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandEndTxnResponse").msgclass
697
+ CommandEndTxnOnPartition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandEndTxnOnPartition").msgclass
698
+ CommandEndTxnOnPartitionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandEndTxnOnPartitionResponse").msgclass
699
+ CommandEndTxnOnSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandEndTxnOnSubscription").msgclass
700
+ CommandEndTxnOnSubscriptionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CommandEndTxnOnSubscriptionResponse").msgclass
701
+ BaseCommand = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.BaseCommand").msgclass
702
+ BaseCommand::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.BaseCommand.Type").enummodule
703
+ CompressionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.CompressionType").enummodule
704
+ ServerError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.ServerError").enummodule
705
+ AuthMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.AuthMethod").enummodule
706
+ ProtocolVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.ProtocolVersion").enummodule
707
+ KeySharedMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.KeySharedMode").enummodule
708
+ TxnAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("pulsar.proto.TxnAction").enummodule
709
+ end
710
+ end