rimless 3.0.0 → 3.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a84c6d640596ee56269220afae67746c855c1fc06c91819312c6a0a9626ed422
4
- data.tar.gz: 7179ae84177669855f9e38b2d044ccf35ccb3405f42b94aa3275ce75907b0cea
3
+ metadata.gz: 04bd2f593f37d4f2a3f287654222585ed5f5c902f65d480b1cf402d910e1fd37
4
+ data.tar.gz: 1d145a8b9d3004ed637241b37b9a2b3a3c99769d3fa171d5c2df94420783634e
5
5
  SHA512:
6
- metadata.gz: 11a1fdcf0a778e581c36055cf4986880940d0fe5b41ec30b569598ad301ce51aae4cf9e2278983d33c77c0e93209b0224021d3b3ba138ac288ce83eb87a30707
7
- data.tar.gz: c5d12b9ca331ea5b1000576c06291ecb1f8d336f2cd25f13ade6c2b509b11a83e50f1f23be3077399c70ec2356623ccfe45ee6edba0177ddeef6378e6805a6d2
6
+ metadata.gz: 54d61bd6c58166b90112547553c5a60a1ea660d950f5cb2b1197ce7be531b67741d3a61a178d1708d9e2628a49c69b0cb2b83f71e103606017b8f9f46c3eab74
7
+ data.tar.gz: fdc7c2aa547c2aaec4e2cc9cbb505b81d109fecab0f89db00ac9632c000ea9ddddce455d6bebdc64f1757501cd4e7ac4d8bb3b9a80d905d8c253235333c6676c
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  * TODO: Replace this bullet point with an actual description of a change.
4
4
 
5
+ ### 3.1.0 (1 April 2026)
6
+
7
+ * Updated the kafka-playground ([#74](https://github.com/hausgold/rimless/pull/74))
8
+
5
9
  ### 3.0.0 (1 April 2026)
6
10
 
7
11
  Breaking changes: ([#73](https://github.com/hausgold/rimless/pull/73))
@@ -1,11 +1,11 @@
1
- FROM hausgold/ruby:3.4
1
+ FROM hausgold/ruby:4.0
2
2
  LABEL org.opencontainers.image.authors="containers@hausgold.de"
3
3
 
4
4
  # Update system gem
5
- RUN gem update --system '3.6.9'
5
+ RUN gem update --system '4.0.9'
6
6
 
7
- # Install nodejs 24
8
- RUN curl -sL https://deb.nodesource.com/setup_24.x | bash -
7
+ # Install nodejs 25
8
+ RUN curl -sL https://deb.nodesource.com/setup_25.x | bash -
9
9
 
10
10
  # Install system packages and the ruby bundless
11
11
  RUN apt-get update -yqqq && \
@@ -14,7 +14,7 @@ RUN apt-get update -yqqq && \
14
14
  ca-certificates jq curl cmake \
15
15
  bash-completion inotify-tools && \
16
16
  echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && /usr/sbin/locale-gen && \
17
- gem install bundler -v '~> 2.6.9' --no-document --no-prerelease
17
+ gem install bundler -v '~> 4.0.9' --no-document --no-prerelease
18
18
 
19
19
  # Install kcat (formerly known as kafkacat)
20
20
  RUN curl -sL -o - \
@@ -3,6 +3,6 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  # A bundle of opinionated Apache Kafka / Confluent Schema Registry helpers.
6
- gem 'rimless', '~> 2.6'
6
+ gem 'rimless', '~> 3.0'
7
7
  # Thor is a toolkit for building powerful command-line interfaces.
8
8
  gem 'thor', '~> 1.5'
@@ -1,7 +1,10 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- activesupport (8.1.2)
4
+ activejob (8.1.3)
5
+ activesupport (= 8.1.3)
6
+ globalid (>= 0.3.6)
7
+ activesupport (8.1.3)
5
8
  base64
6
9
  bigdecimal
7
10
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -14,163 +17,198 @@ GEM
14
17
  securerandom (>= 0.3)
15
18
  tzinfo (~> 2.0, >= 2.0.5)
16
19
  uri (>= 0.13.1)
17
- addressable (2.8.7)
18
- public_suffix (>= 2.0.2, < 7.0)
19
- avro (1.9.2)
20
- multi_json
21
- avro_turf (0.11.0)
22
- avro (>= 1.7.7, < 1.10)
23
- excon (~> 0.45)
24
- base64 (0.2.0)
25
- bigdecimal (3.1.9)
26
- concurrent-ruby (1.3.5)
27
- connection_pool (2.5.0)
28
- crack (1.0.0)
20
+ addressable (2.8.9)
21
+ public_suffix (>= 2.0.2, < 8.0)
22
+ avro (1.12.1)
23
+ multi_json (~> 1.0)
24
+ avro_turf (1.20.1)
25
+ avro (>= 1.11.3, < 1.13)
26
+ excon (>= 0.104, < 2)
27
+ base64 (0.3.0)
28
+ bigdecimal (4.1.0)
29
+ concurrent-ruby (1.3.6)
30
+ connection_pool (3.0.2)
31
+ crack (1.0.1)
29
32
  bigdecimal
30
33
  rexml
31
- delivery_boy (1.2.0)
32
- king_konf (~> 1.0)
33
- ruby-kafka (~> 1.5)
34
- digest-crc (0.7.0)
35
- rake (>= 12.0.0, < 14.0.0)
36
- drb (2.2.1)
37
- dry-configurable (0.16.1)
38
- dry-core (~> 0.6)
39
- zeitwerk (~> 2.6)
40
- dry-container (0.11.0)
41
- concurrent-ruby (~> 1.0)
42
- dry-core (0.9.1)
43
- concurrent-ruby (~> 1.0)
44
- zeitwerk (~> 2.6)
45
- dry-events (0.4.0)
46
- concurrent-ruby (~> 1.0)
47
- dry-core (~> 0.9, >= 0.9)
48
- dry-inflector (0.3.0)
49
- dry-initializer (3.1.1)
50
- dry-logic (1.3.0)
51
- concurrent-ruby (~> 1.0)
52
- dry-core (~> 0.9, >= 0.9)
53
- zeitwerk (~> 2.6)
54
- dry-monitor (0.7.0)
55
- dry-configurable (~> 0.16, >= 0.16.0)
56
- dry-core (~> 0.9, >= 0.9)
57
- dry-events (~> 0.4, >= 0.4.0)
58
- dry-schema (1.11.3)
59
- concurrent-ruby (~> 1.0)
60
- dry-configurable (~> 0.16, >= 0.16)
61
- dry-core (~> 0.9, >= 0.9)
62
- dry-initializer (~> 3.0)
63
- dry-logic (~> 1.3)
64
- dry-types (~> 1.6)
65
- zeitwerk (~> 2.6)
66
- dry-types (1.6.1)
67
- concurrent-ruby (~> 1.0)
68
- dry-container (~> 0.3)
69
- dry-core (~> 0.9, >= 0.9)
70
- dry-inflector (~> 0.1, >= 0.1.2)
71
- dry-logic (~> 1.3, >= 1.3)
72
- zeitwerk (~> 2.6)
73
- dry-validation (1.9.0)
74
- concurrent-ruby (~> 1.0)
75
- dry-container (~> 0.7, >= 0.7.1)
76
- dry-core (~> 0.9, >= 0.9)
77
- dry-initializer (~> 3.0)
78
- dry-schema (~> 1.11, >= 1.11.0)
79
- zeitwerk (~> 2.6)
80
- envlogic (1.1.5)
81
- dry-inflector (~> 0.1)
82
- excon (0.112.0)
83
- hashdiff (1.1.2)
84
- i18n (1.14.7)
34
+ drb (2.2.3)
35
+ excon (1.4.2)
36
+ logger
37
+ ffi (1.17.4)
38
+ ffi (1.17.4-aarch64-linux-gnu)
39
+ ffi (1.17.4-aarch64-linux-musl)
40
+ ffi (1.17.4-arm-linux-gnu)
41
+ ffi (1.17.4-arm-linux-musl)
42
+ ffi (1.17.4-arm64-darwin)
43
+ ffi (1.17.4-x86-linux-gnu)
44
+ ffi (1.17.4-x86-linux-musl)
45
+ ffi (1.17.4-x86_64-darwin)
46
+ ffi (1.17.4-x86_64-linux-gnu)
47
+ ffi (1.17.4-x86_64-linux-musl)
48
+ globalid (1.3.0)
49
+ activesupport (>= 6.1)
50
+ hashdiff (1.2.1)
51
+ i18n (1.14.8)
85
52
  concurrent-ruby (~> 1.0)
86
- json (2.18.0)
87
- karafka (1.4.14)
88
- concurrent-ruby
89
- dry-configurable (~> 0.16)
90
- dry-inflector (~> 0.2)
91
- dry-monitor (~> 0.5)
92
- dry-validation (~> 1.7)
93
- envlogic (~> 1.1)
94
- ruby-kafka (>= 1.3.0)
95
- thor (>= 1.1)
96
- waterdrop (~> 1.4)
97
- zeitwerk (~> 2.6)
98
- karafka-sidekiq-backend (1.4.9)
99
- karafka (~> 1.4.0)
100
- sidekiq (>= 4.2)
101
- karafka-testing (1.4.5)
102
- karafka (~> 1.4.0)
103
- king_konf (1.0.1)
104
- logger (1.6.6)
105
- minitest (5.25.4)
106
- multi_json (1.15.0)
107
- mustermann (2.0.2)
108
- ruby2_keywords (~> 0.0.1)
109
- mutex_m (0.3.0)
110
- ostruct (0.6.3)
111
- public_suffix (5.1.1)
112
- rack (2.2.11)
113
- rack-protection (2.2.4)
114
- rack
115
- rake (13.2.1)
116
- redis-client (0.23.2)
117
- connection_pool
53
+ json (2.19.3)
54
+ karafka (2.5.9)
55
+ karafka-core (>= 2.5.6, < 2.6.0)
56
+ karafka-rdkafka (>= 0.24.0)
57
+ waterdrop (>= 2.8.14, < 3.0.0)
58
+ zeitwerk (~> 2.3)
59
+ karafka-core (2.5.10)
60
+ karafka-rdkafka (>= 0.20.0)
61
+ logger (>= 1.6.0)
62
+ karafka-rdkafka (0.24.0)
63
+ ffi (~> 1.17.1)
64
+ json (> 2.0)
65
+ logger
66
+ mini_portile2 (~> 2.6)
67
+ rake (> 12)
68
+ karafka-rdkafka (0.24.0-aarch64-linux-gnu)
69
+ ffi (~> 1.17.1)
70
+ json (> 2.0)
71
+ logger
72
+ mini_portile2 (~> 2.6)
73
+ rake (> 12)
74
+ karafka-rdkafka (0.24.0-aarch64-linux-musl)
75
+ ffi (~> 1.17.1)
76
+ json (> 2.0)
77
+ logger
78
+ mini_portile2 (~> 2.6)
79
+ rake (> 12)
80
+ karafka-rdkafka (0.24.0-arm64-darwin)
81
+ ffi (~> 1.17.1)
82
+ json (> 2.0)
83
+ logger
84
+ mini_portile2 (~> 2.6)
85
+ rake (> 12)
86
+ karafka-rdkafka (0.24.0-x86_64-linux-gnu)
87
+ ffi (~> 1.17.1)
88
+ json (> 2.0)
89
+ logger
90
+ mini_portile2 (~> 2.6)
91
+ rake (> 12)
92
+ karafka-rdkafka (0.24.0-x86_64-linux-musl)
93
+ ffi (~> 1.17.1)
94
+ json (> 2.0)
95
+ logger
96
+ mini_portile2 (~> 2.6)
97
+ rake (> 12)
98
+ karafka-testing (2.5.5)
99
+ karafka (>= 2.5.0, < 2.6.0)
100
+ waterdrop (>= 2.8.0)
101
+ logger (1.7.0)
102
+ mini_portile2 (2.8.9)
103
+ minitest (6.0.3)
104
+ drb (~> 2.0)
105
+ prism (~> 1.5)
106
+ multi_json (1.19.1)
107
+ prism (1.9.0)
108
+ public_suffix (7.0.5)
109
+ rake (13.3.1)
118
110
  retries (0.0.5)
119
- rexml (3.4.1)
120
- rimless (2.6.0)
121
- activesupport (>= 7.2)
122
- avro_turf (~> 0.11.0)
123
- karafka (~> 1.4, < 1.4.15)
124
- karafka-sidekiq-backend (~> 1.4)
125
- karafka-testing (~> 1.4)
126
- mutex_m (>= 0.3)
127
- ostruct (>= 0.6)
111
+ rexml (3.4.4)
112
+ rimless (3.0.0)
113
+ activejob (>= 8.0)
114
+ activesupport (>= 8.0)
115
+ avro_turf (~> 1.20)
116
+ karafka (~> 2.5)
117
+ karafka-testing (~> 2.5)
118
+ logger (~> 1.7)
128
119
  retries (>= 0.0.5)
129
- sinatra (>= 2.2)
130
120
  sparsify (~> 1.1)
131
- waterdrop (~> 1.4)
132
- webmock (~> 3.18)
133
- zeitwerk (~> 2.6)
134
- ruby-kafka (1.5.0)
135
- digest-crc
136
- ruby2_keywords (0.0.5)
137
- securerandom (0.3.2)
138
- sidekiq (7.3.9)
139
- base64
140
- connection_pool (>= 2.3.0)
141
- logger
142
- rack (>= 2.2.4)
143
- redis-client (>= 0.22.2)
144
- sinatra (2.2.4)
145
- mustermann (~> 2.0)
146
- rack (~> 2.2)
147
- rack-protection (= 2.2.4)
148
- tilt (~> 2.0)
121
+ waterdrop (~> 2.8)
122
+ webmock (~> 3.26)
123
+ zeitwerk (~> 2.7)
124
+ securerandom (0.4.1)
149
125
  sparsify (1.1.0)
150
126
  thor (1.5.0)
151
- tilt (2.6.0)
152
127
  tzinfo (2.0.6)
153
128
  concurrent-ruby (~> 1.0)
154
129
  uri (1.1.1)
155
- waterdrop (1.4.4)
156
- delivery_boy (>= 0.2, < 2.x)
157
- dry-configurable (~> 0.13)
158
- dry-monitor (~> 0.5)
159
- dry-validation (~> 1.7)
160
- ruby-kafka (>= 1.3.0)
161
- zeitwerk (~> 2.4)
162
- webmock (3.25.0)
130
+ waterdrop (2.8.16)
131
+ karafka-core (>= 2.4.9, < 3.0.0)
132
+ karafka-rdkafka (>= 0.24.0)
133
+ zeitwerk (~> 2.3)
134
+ webmock (3.26.2)
163
135
  addressable (>= 2.8.0)
164
136
  crack (>= 0.3.2)
165
137
  hashdiff (>= 0.4.0, < 2.0.0)
166
- zeitwerk (2.6.18)
138
+ zeitwerk (2.7.5)
167
139
 
168
140
  PLATFORMS
169
- x86_64-linux
141
+ aarch64-linux-gnu
142
+ aarch64-linux-musl
143
+ arm-linux-gnu
144
+ arm-linux-musl
145
+ arm64-darwin
146
+ ruby
147
+ x86-linux-gnu
148
+ x86-linux-musl
149
+ x86_64-darwin
150
+ x86_64-linux-gnu
151
+ x86_64-linux-musl
170
152
 
171
153
  DEPENDENCIES
172
- rimless (~> 2.6)
154
+ rimless (~> 3.0)
173
155
  thor (~> 1.5)
174
156
 
157
+ CHECKSUMS
158
+ activejob (8.1.3) sha256=a149b1766aa8204c3c3da7309e4becd40fcd5529c348cffbf6c9b16b565fe8d3
159
+ activesupport (8.1.3) sha256=21a5e0dfbd4c3ddd9e1317ec6a4d782fa226e7867dc70b0743acda81a1dca20e
160
+ addressable (2.8.9) sha256=cc154fcbe689711808a43601dee7b980238ce54368d23e127421753e46895485
161
+ avro (1.12.1) sha256=e2a32e605e935f9196d590bb193d1fa13b83d169303b811ecb614e67ad59ac43
162
+ avro_turf (1.20.1) sha256=3962f5fe05a5e6db65bd6d41943d0b0153636751c4dcb5ded4ab4d7d2ddd9abb
163
+ base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
164
+ bigdecimal (4.1.0) sha256=6dc07767aa3dc456ccd48e7ae70a07b474e9afd7c5bc576f80bd6da5c8dd6cae
165
+ concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab
166
+ connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
167
+ crack (1.0.1) sha256=ff4a10390cd31d66440b7524eb1841874db86201d5b70032028553130b6d4c7e
168
+ drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
169
+ excon (1.4.2) sha256=32d8d8eda619717d9b8043b4675e096fb5c2139b080e2ad3b267f88c545aaa35
170
+ ffi (1.17.4) sha256=bcd1642e06f0d16fc9e09ac6d49c3a7298b9789bcb58127302f934e437d60acf
171
+ ffi (1.17.4-aarch64-linux-gnu) sha256=b208f06f91ffd8f5e1193da3cae3d2ccfc27fc36fba577baf698d26d91c080df
172
+ ffi (1.17.4-aarch64-linux-musl) sha256=9286b7a615f2676245283aef0a0a3b475ae3aae2bb5448baace630bb77b91f39
173
+ ffi (1.17.4-arm-linux-gnu) sha256=d6dbddf7cb77bf955411af5f187a65b8cd378cb003c15c05697f5feee1cb1564
174
+ ffi (1.17.4-arm-linux-musl) sha256=9d4838ded0465bef6e2426935f6bcc93134b6616785a84ffd2a3d82bc3cf6f95
175
+ ffi (1.17.4-arm64-darwin) sha256=19071aaf1419251b0a46852abf960e77330a3b334d13a4ab51d58b31a937001b
176
+ ffi (1.17.4-x86-linux-gnu) sha256=38e150df5f4ca555e25beca4090823ae09657bceded154e3c52f8631c1ed72cf
177
+ ffi (1.17.4-x86-linux-musl) sha256=fbeec0fc7c795bcf86f623bb18d31ea1820f7bd580e1703a3d3740d527437809
178
+ ffi (1.17.4-x86_64-darwin) sha256=aa70390523cf3235096cf64962b709b4cfbd5c082a2cb2ae714eb0fe2ccda496
179
+ ffi (1.17.4-x86_64-linux-gnu) sha256=9d3db14c2eae074b382fa9c083fe95aec6e0a1451da249eab096c34002bc752d
180
+ ffi (1.17.4-x86_64-linux-musl) sha256=3fdf9888483de005f8ef8d1cf2d3b20d86626af206cbf780f6a6a12439a9c49e
181
+ globalid (1.3.0) sha256=05c639ad6eb4594522a0b07983022f04aa7254626ab69445a0e493aa3786ff11
182
+ hashdiff (1.2.1) sha256=9c079dbc513dfc8833ab59c0c2d8f230fa28499cc5efb4b8dd276cf931457cd1
183
+ i18n (1.14.8) sha256=285778639134865c5e0f6269e0b818256017e8cde89993fdfcbfb64d088824a5
184
+ json (2.19.3) sha256=289b0bb53052a1fa8c34ab33cc750b659ba14a5c45f3fcf4b18762dc67c78646
185
+ karafka (2.5.9) sha256=a9806644f75aafd62f40f1c203ec485250f42a1520d1e14d7e7ba4bf23f3321f
186
+ karafka-core (2.5.10) sha256=a4f9127186728502decf0817d366b4eec46593390047c278acddb636e63e384c
187
+ karafka-rdkafka (0.24.0) sha256=91e9eb753d7f72036721af4ce0f3f2dcf7c145a2e324fc1cba7b6f837def4e09
188
+ karafka-rdkafka (0.24.0-aarch64-linux-gnu) sha256=1685c91b81ee97d81528f03db292eadad3a7e191b29613f24d5ba9a7a434f097
189
+ karafka-rdkafka (0.24.0-aarch64-linux-musl) sha256=498c70b2db1b89c2e68d6d8b8884cf60a5e3b24747c077c72dc0329007f6ba36
190
+ karafka-rdkafka (0.24.0-arm64-darwin) sha256=08863151181c7aebd028049f9e8ff75ed55f9b1846f7eedb4dd82937cf18845f
191
+ karafka-rdkafka (0.24.0-x86_64-linux-gnu) sha256=a1c8561f6df2e3d466053cebeeab6ae96ebd7aa931632ab49d18a71cae978633
192
+ karafka-rdkafka (0.24.0-x86_64-linux-musl) sha256=dcb3f4017d204bb3c46dd39b41dbe568eee6babc69063663a1ce6e13ce08136e
193
+ karafka-testing (2.5.5) sha256=fa7ca34b0760ea76a392113813a122f07ffbade300e145c2190555db4619d338
194
+ logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
195
+ mini_portile2 (2.8.9) sha256=0cd7c7f824e010c072e33f68bc02d85a00aeb6fce05bb4819c03dfd3c140c289
196
+ minitest (6.0.3) sha256=88ac8a1de36c00692420e7cb3cc11a0773bbcb126aee1c249f320160a7d11411
197
+ multi_json (1.19.1) sha256=7aefeff8f2c854bf739931a238e4aea64592845e0c0395c8a7d2eea7fdd631b7
198
+ prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
199
+ public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623
200
+ rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c
201
+ retries (0.0.5) sha256=47b9be7935151d4ad5b63b10886fa602f2c9776a0a01466cb56a50ef0d9bb1cf
202
+ rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142
203
+ rimless (3.0.0) sha256=2c36fbbe041a0f0c161cad9dea32d849440accce0ca91153a500fef21ad2e903
204
+ securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
205
+ sparsify (1.1.0) sha256=b36ccdcd8c7540a9bc86514a78183819d424408c4dfd679820983d8d1b7a0e30
206
+ thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73
207
+ tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
208
+ uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
209
+ waterdrop (2.8.16) sha256=a48e795b5eaeb3cef77b4eb0f98e9e88e657cf02a8120bc8a1597dc6bf9626c1
210
+ webmock (3.26.2) sha256=774556f2ea6371846cca68c01769b2eac0d134492d21f6d0ab5dd643965a4c90
211
+ zeitwerk (2.7.5) sha256=d8da92128c09ea6ec62c949011b00ed4a20242b255293dd66bf41545398f73dd
212
+
175
213
  BUNDLED WITH
176
- 2.6.9
214
+ 4.0.9
@@ -93,7 +93,7 @@ working Apache Kafka setup which includes the following:
93
93
  Start a playground container with `$ make start` and run the following:
94
94
 
95
95
  ```shell
96
- $ create-topic -v test
96
+ $ create-topic -v test -p 2 compression.type=gzip
97
97
  ```
98
98
 
99
99
  ```shell
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
 
3
3
  if [ -z "${GROUP}" ]; then
4
4
  GROUP="kcat"
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require_relative '../config/environment'
4
5
 
@@ -6,37 +7,47 @@ class CreateTopic < Thor
6
7
  default_command :create
7
8
 
8
9
  desc 'NAME [CONFIGS...]', 'create a new Apache Kafka topic'
9
- option :partitions, aliases: '-p', type: :numeric, default: 1,
10
+ option :partitions,
11
+ aliases: '-p',
12
+ type: :numeric,
13
+ default: 1,
10
14
  desc: 'The number of partitions'
11
- option :replicas, aliases: '-r', type: :numeric, default: 1,
15
+ option :replicas,
16
+ aliases: '-r',
17
+ type: :numeric,
18
+ default: 1,
12
19
  desc: 'The number of replications'
13
- option :verbose, aliases: '-v', type: :boolean,
20
+ option :verbose,
21
+ aliases: '-v',
22
+ type: :boolean,
14
23
  desc: 'Enable verbose outputs'
15
24
 
16
25
  def create(name, *configs)
17
26
  debug! options
18
27
 
19
- opts = {
20
- num_partitions: options[:partitions].to_i,
21
- replication_factor: options[:replicas].to_i,
22
- }
23
- config = configs.map { |conf| conf.split('=').map(&:strip) }.to_h
24
-
25
28
  if topic?(name)
26
- STDERR.puts "The topic '#{name}' already exists."
27
- puts JSON.pretty_generate(@topic_conf)
29
+ warn "The topic '#{name}' already exists."
30
+ puts JSON.pretty_generate(describe_topic(name))
28
31
  exit
29
32
  end
30
33
 
31
34
  # Create the topic
32
- KafkaClient.create_topic(name, **opts, config: config)
35
+ KafkaAdminClient.create_topic(
36
+ name,
37
+ options[:partitions].to_i,
38
+ options[:replicas].to_i,
39
+ configs.to_h { |conf| conf.split('=').map(&:strip) }
40
+ ).wait
33
41
 
34
42
  # Fetch the topic config
35
- puts JSON.pretty_generate(KafkaClient.describe_topic(name))
36
- rescue Kafka::InvalidConfig
37
- STDOUT.puts "Could not create the topic '#{name}'."
38
- STDOUT.puts "The given configuration is invalid:\n\n"
39
- puts JSON.pretty_generate(config)
43
+ puts JSON.pretty_generate(describe_topic(name))
44
+ KafkaAdminClient.close
45
+ rescue Rdkafka::RdkafkaError, Rdkafka::Config::ConfigError => e
46
+ warn "Could not create the topic '#{name}'."
47
+ warn "The given configuration is invalid:\n\n"
48
+ warn JSON.pretty_generate(configs)
49
+ $stderr.puts
50
+ warn e.message
40
51
  exit 1
41
52
  end
42
53
  end
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require_relative '../config/environment'
4
5
 
@@ -6,18 +7,22 @@ class DeleteTopic < Thor
6
7
  default_command :delete
7
8
 
8
9
  desc 'NAME', 'delete an existing Apache Kafka topic'
9
- option :verbose, aliases: '-v', type: :boolean,
10
+ option :verbose,
11
+ aliases: '-v',
12
+ type: :boolean,
10
13
  desc: 'Enable verbose outputs'
11
14
 
12
15
  def delete(name)
13
16
  debug! options
14
17
 
15
18
  unless topic?(name)
16
- STDERR.puts "The topic '#{name}' does not exists."
19
+ warn "The topic '#{name}' does not exists."
17
20
  exit 1
18
21
  end
19
22
 
20
- KafkaClient.delete_topic name
23
+ puts JSON.pretty_generate(describe_topic(name))
24
+ KafkaAdminClient.delete_topic(name).wait
25
+ KafkaAdminClient.close
21
26
  end
22
27
  end
23
28
  DeleteTopic.start(args!)
@@ -1,3 +1,3 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
 
3
3
  kcat -L ${@}
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require_relative '../config/environment'
4
5
 
@@ -6,25 +7,25 @@ class ProduceTopic < Thor
6
7
  default_command :produce
7
8
 
8
9
  desc 'TOPIC FILE...', 'produce a new event at a given Apache Kafka topic'
9
- option :partition, aliases: '-p', type: :numeric,
10
+ option :partition,
11
+ aliases: '-p',
12
+ type: :numeric,
10
13
  desc: 'The topic partitions to write to'
11
- option :partition_key, aliases: '-k', type: :string,
14
+ option :partition_key,
15
+ aliases: '-k',
16
+ type: :string,
12
17
  desc: 'The partition key to use to select the partition'
13
- option :verbose, aliases: '-v', type: :boolean,
18
+ option :verbose,
19
+ aliases: '-v',
20
+ type: :boolean,
14
21
  desc: 'Enable verbose outputs'
15
22
 
16
23
  def produce(topic, *files)
17
24
  debug! options
18
25
 
19
- opts = {
20
- topic: topic,
21
- partition: options[:partition]&.to_i,
22
- partition_key: options[:partition_key]
23
- }.compact
24
-
25
26
  if options.key?(:partition) && options.key?(:partition_key)
26
- STDERR.puts 'Either use the fixed partition or a partition key.'
27
- STDERR.puts 'But not both together.'
27
+ warn 'Either use the fixed partition or a partition key.'
28
+ warn 'But not both together.'
28
29
  exit 1
29
30
  end
30
31
 
@@ -32,7 +33,7 @@ class ProduceTopic < Thor
32
33
  next '/dev/stdin' if file == '-'
33
34
 
34
35
  unless File.file? file
35
- STDERR.puts "File '#{file}' does not exist."
36
+ warn "File '#{file}' does not exist."
36
37
  next
37
38
  end
38
39
 
@@ -40,26 +41,38 @@ class ProduceTopic < Thor
40
41
  end.compact.uniq
41
42
 
42
43
  if files.empty?
43
- STDERR.puts 'No files given or exists.'
44
- STDERR.puts 'You have to specify file(s) or use `-\' for stdin.'
44
+ warn 'No files given or exists.'
45
+ warn 'You have to specify file(s) or use `-\' for stdin.'
45
46
  exit 1
46
47
  end
47
48
 
48
- producer = KafkaClient.producer
49
+ delivery_handles = []
50
+ producer = $rdkafka_config.producer
49
51
 
50
52
  files.each do |file|
51
53
  puts "Processing lines of '#{file}' .."
52
54
  File.open(file, 'r') do |f|
53
55
  f.each_line.lazy.each do |line|
54
56
  puts line
55
- producer.produce(line, **opts)
57
+ delivery_handles << producer.produce(
58
+ topic: topic,
59
+ payload: line,
60
+ **{
61
+ partition: options[:partition]&.to_i,
62
+ partition_key: options[:partition_key]
63
+ }.compact
64
+ )
56
65
  puts
57
66
  end
58
67
  end
59
- producer.deliver_messages
68
+ delivery_handles.each(&:wait)
69
+ producer.flush
70
+ producer.close
60
71
  end
61
72
  rescue Interrupt
62
- producer.deliver_messages
73
+ delivery_handles.each(&:wait)
74
+ producer.flush
75
+ producer.close
63
76
  end
64
77
  end
65
78
  ProduceTopic.start(args!)
@@ -5,53 +5,21 @@ require 'bundler/setup' # Set up gems listed in the Gemfile.
5
5
  require 'active_support'
6
6
  require 'active_support/all'
7
7
  require 'json'
8
- require 'pp'
9
8
 
10
9
  Bundler.require(:default)
11
10
  ActiveSupport.eager_load!
12
11
 
13
- AppLogger = Logger.new(STDOUT)
12
+ AppLogger = Logger.new($stdout)
14
13
  AppLogger.level = Logger::FATAL
15
- AppLogger.level = Logger::DEBUG if ENV.fetch('DEBUG', '').match? /true|1|on/
14
+ AppLogger.level = Logger::DEBUG if ENV.fetch('DEBUG', '').match?(/true|1|on/)
16
15
 
17
- Rimless.configure do |conf|
18
- conf.env = 'production'
19
- conf.app_name = 'playground_app'
20
- conf.client_id = 'playground'
21
- conf.logger = AppLogger
22
- conf.kafka_brokers = ['kafka://kafka.playground.local:9092']
23
- conf.schema_registry_url = 'http://schema-registry.playground.local'
24
- end
25
-
26
- KafkaClient = Kafka.new(Rimless.configuration.kafka_brokers, logger: AppLogger)
27
-
28
- # +Resolv+ is a thread-aware DNS resolver library written in Ruby. Some newer
29
- # networking libraries like excon (>=0.85.0) makes use of it instead of the
30
- # regular glibc facility. This raises an issue for our local development as we
31
- # use the mDNS stack which is configured in every Docker image accordingly
32
- # (Avahi, libnss[-mdns]). The default resolver of +Resolv+ does not include the
33
- # mDNS stack so we have to reconfigure it here for local usage only.
34
- #
35
- # See: https://docs.ruby-lang.org/en/2.7.0/Resolv.html
36
- require 'resolv'
37
- Resolv::DefaultResolver.replace_resolvers(
38
- [
39
- Resolv::Hosts.new,
40
- Resolv::MDNS.new,
41
- Resolv::DNS.new
42
- ]
43
- )
44
-
45
- def topic?(name)
46
- @topic_conf = KafkaClient.describe_topic(name)
47
- rescue Kafka::UnknownTopicOrPartition
48
- false
49
- end
16
+ Dir[File.expand_path('initializers/*.rb', __dir__)].each { |f| require f }
50
17
 
51
18
  def args!
52
19
  app = Thor.descendants.map(&:to_s)
53
- .reject { |klass| klass.include? '::' }.first
54
- raise "No Thor application class was found." unless app
20
+ .reject { |klass| klass.include? '::' }.first
21
+ raise 'No Thor application class was found.' unless app
22
+
55
23
  app = app.constantize
56
24
 
57
25
  help = ARGV.any? { |arg| %w[help -h --help].include?(arg) }
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'resolv'
4
+
5
+ # Check if we're running in an environment without IPv6 support, requesting
6
+ # IPv6 nameservers for mDNS will result in the following error:
7
+ #
8
+ # Errno::EADDRNOTAVAIL: Cannot assign requested address
9
+ # sendto(2) for "ff02::fb" port 5353
10
+ #
11
+ # This is confusing, as we expect a mDNS lookup failure to look like this:
12
+ #
13
+ # no address for schema-registry.message-bus.local (Resolv::ResolvError)
14
+ #
15
+ # Therefore, we drop the IPv6 mDNS nameserver address.
16
+ if File.empty?('/proc/net/if_inet6')
17
+ Resolv::MDNS::Addresses.delete_if do |(ip, _port)|
18
+ ip == Resolv::MDNS::AddressV6
19
+ end
20
+ end
21
+
22
+ # A custom resolver factory for our local environments.
23
+ # See: https://github.com/excon/excon/pull/897
24
+ class LocalResolverFactory
25
+ # Create a new +Resolv+ resolver instance, configured for our local
26
+ # environment.
27
+ #
28
+ # @return [Resolv] the new resolver instance
29
+ def self.create_resolver
30
+ Resolv.new(create_resolvers)
31
+ end
32
+
33
+ # Create new resolvers for our local environment (hosts, mDNS, DNS).
34
+ #
35
+ # @return [Array<Resolv::Hosts, Resolv::MDNS, Resolv::DNS>] the new
36
+ # resolvers to combine
37
+ def self.create_resolvers
38
+ # The misleading Errno::EADDRNOTAVAIL, catches an awful long timeout for
39
+ # the mDNS resolver (75 seconds). But when we're going to remove the IPv6
40
+ # mDNS nameserver address, we have to configure more meaningful timeouts
41
+ # for mDNS.
42
+ mdns_resolver = Resolv::MDNS.new
43
+ mdns_resolver.timeouts = 3
44
+
45
+ [
46
+ Resolv::Hosts.new,
47
+ mdns_resolver,
48
+ Resolv::DNS.new
49
+ ]
50
+ end
51
+ end
52
+
53
+ # Replace the default resolvers
54
+ Resolv::DefaultResolver.replace_resolvers(
55
+ LocalResolverFactory.create_resolvers
56
+ )
57
+
58
+ # Configure Excon to use our custom resolver factory
59
+ Excon.defaults[:resolver_factory] = LocalResolverFactory
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ Rimless.configure do |conf|
4
+ conf.env = 'production'
5
+ conf.app_name = 'playground_app'
6
+ conf.client_id = 'playground'
7
+ conf.logger = AppLogger
8
+ conf.kafka_brokers = 'kafka.playground.local:9092'
9
+ conf.schema_registry_url = 'http://schema-registry.playground.local'
10
+ end
11
+
12
+ $kafka_config = Rimless.producer.config.kafka
13
+ $rdkafka_config = Rdkafka::Config.new($kafka_config)
14
+
15
+ KafkaAdminClient = $rdkafka_config.admin
16
+
17
+ def describe_topic(name)
18
+ return unless topic?(name)
19
+
20
+ topics[name].merge(configs: topic_configs(name))
21
+ end
22
+
23
+ def topic_configs(name)
24
+ KafkaAdminClient.describe_configs(
25
+ [{ resource_type: 2, resource_name: name.to_s }]
26
+ ).wait.resources.first.configs.map do |conf|
27
+ [conf.name, conf.value]
28
+ end.sort_by(&:first).to_h
29
+ end
30
+
31
+ def topic?(name)
32
+ topics.key? name.to_s
33
+ end
34
+
35
+ def topics
36
+ $rdkafka_config.admin.metadata.topics.index_by do |cur|
37
+ cur[:topic_name].to_s
38
+ end
39
+ end
@@ -1,42 +1,41 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require_relative '../config/environment'
4
5
 
5
6
  # Setup classes which are Apache Avro schema compatible, can be anything which
6
7
  # be converted to a hash via +#to_h+ (eg. OpenStruct, RecursiveOpenStruct,
7
8
  # Class, Struct, etc)
8
- PaymentEvent = Struct.new(:event, :payment,
9
- keyword_init: true)
9
+ PaymentEvent = Struct.new(:event, :payment)
10
10
 
11
11
  Payment = Struct.new(:gid, :currency, :net_amount_sum, :items, :state,
12
- :created_at, :updated_at,
13
- keyword_init: true)
12
+ :created_at, :updated_at)
14
13
 
15
- PaymentItem = Struct.new(:gid, :net_amount, :tax_rate, :created_at, :updated_at,
16
- keyword_init: true)
14
+ PaymentItem = Struct.new(:gid, :net_amount, :tax_rate, :created_at,
15
+ :updated_at)
17
16
 
18
17
  # Setup the real data instances which we serialize with Apache Avro and push to
19
18
  # Apache Kafka
20
- item_1_id = SecureRandom.uuid
21
- item_1 = PaymentItem.new(gid: "gid://playground-app/PaymentItem/#{item_1_id}",
22
- net_amount: 499,
23
- tax_rate: 19,
24
- created_at: Time.current,
25
- updated_at: nil)
26
-
27
- item_2_id = SecureRandom.uuid
28
- item_2 = PaymentItem.new(gid: "gid://playground-app/PaymentItem/#{item_2_id}",
29
- net_amount: 1,
30
- tax_rate: 19,
31
- created_at: Time.current,
32
- updated_at: nil)
19
+ item1_id = SecureRandom.uuid
20
+ item1 = PaymentItem.new(gid: "gid://playground-app/PaymentItem/#{item1_id}",
21
+ net_amount: 499,
22
+ tax_rate: 19,
23
+ created_at: Time.current,
24
+ updated_at: nil)
25
+
26
+ item2_id = SecureRandom.uuid
27
+ item2 = PaymentItem.new(gid: "gid://playground-app/PaymentItem/#{item2_id}",
28
+ net_amount: 1,
29
+ tax_rate: 19,
30
+ created_at: Time.current,
31
+ updated_at: nil)
33
32
 
34
33
  payment_id = SecureRandom.uuid
35
34
  payment = Payment.new(gid: "gid://playground-app/Payment/#{payment_id}",
36
35
  currency: :eur,
37
36
  net_amount_sum: 500,
38
37
  state: :authorized,
39
- items: [item_1, item_2],
38
+ items: [item1, item2],
40
39
  created_at: Time.current,
41
40
  updated_at: Time.current)
42
41
 
@@ -4,8 +4,8 @@
4
4
  module Rimless
5
5
  # The version of the +rimless+ gem
6
6
  # TODO: Change back before release.
7
- # VERSION = '3.0.0'
8
- VERSION = '3.0.0'
7
+ # VERSION = '3.1.0'
8
+ VERSION = '3.1.0'
9
9
 
10
10
  class << self
11
11
  # Returns the version of gem as a string.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rimless
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hermann Mayer
@@ -218,6 +218,8 @@ files:
218
218
  - doc/kafka-playground/config/docker/shell/.gemrc
219
219
  - doc/kafka-playground/config/docker/shell/.inputrc
220
220
  - doc/kafka-playground/config/environment.rb
221
+ - doc/kafka-playground/config/initializers/resolv.rb
222
+ - doc/kafka-playground/config/initializers/rimless.rb
221
223
  - doc/kafka-playground/doc/assets/project.svg
222
224
  - doc/kafka-playground/docker-compose.yml
223
225
  - doc/kafka-playground/examples/rimless-produce