Commit aab823f
authored
Adopt
* Adapt `swift-service-lifecycle`
Modifications:
* add `swift-service-lifecycle` aka `ServicLifecycle` dependency to
`Package.swift`
* add `Sendable` conformance to the following types:
* `KafkaProducerConfiguration`
* `KafkaConsumerConfiguration`
* `KafkaTopicConfiguration`
* `KafkaPartition`
* `KafkaClient`
* `KafkaConsumerMessages`
* `KafkaConsumerMessage`
* `RDKafkaConfig.CapturedClosures`
* `RDKafkaTopicHandles`
* add `@unchecked Sendable` conformance to the following types:
* `KafkaProducer`
* `KafkaConsumer`
* add `Service` conformance to the following types:
* `KafkaProducer`
* `KafkaConsumer`
* `SwiftKafkaTests`:
* use `ServiceGroup`s
* `KafkaProducerTests`:
* use `ServiceGroup`s
* remove `testFlushQueuedProducerMessages` as it relied on the now
`private` implementation detail `triggerGracefulShutdown`
* remove `testProducerNotUsableAfterShutdown` as it relied on the now
`private` implementation detail `triggerGracefulShutdown`
* `testNoMemoryLeakAfterShutdown`: remove obsolete wait for timeout
as flushing in `KafkaProducer` is now non-blocking
* `KafkaConsumer`:
* remove `triggerGracefulShutdown` on `deinit` -> this is now
`ServicLifecycle`'s responsibility
* refactor `RDKafkaConfig` to make `RDKafkaConfig.CapturedClosures`
sendable
* Remove `ShutdownOnTerminate` for `AsyncSequence`s
Motivation:
Exiting the `run()` loop early is an error in `swift-service-lifecycle`.
Therefore we **don't** want to invoke
`KafkaProducer/KafkaConsumer.triggerGracefulShutdown()` when the our
`NIOAsyncSequence`s have stopped being consumed
Modifications:
* remove `Kafka[Producer|Consumer]ShutdownOnTerminate` behaviour
* adjust tests
* Review Franz
Modifications:
* remove `*Service` suffix from `consumerService` and `producerService`
in tests and README
* remove old comment in `KafkaConsumer`swift-service-lifecycle (#81)1 parent 5ed295f commit aab823f
File tree
15 files changed
+299
-284
lines changed- Sources/SwiftKafka
- Configuration
- RDKafka
- Utilities
- Tests
- IntegrationTests
- SwiftKafkaTests
15 files changed
+299
-284
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
35 | | - | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
42 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
43 | 52 | | |
44 | 53 | | |
45 | 54 | | |
| |||
54 | 63 | | |
55 | 64 | | |
56 | 65 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
| |||
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
79 | | - | |
| 85 | + | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
83 | 89 | | |
84 | 90 | | |
85 | 91 | | |
86 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
87 | 98 | | |
88 | 99 | | |
89 | 100 | | |
| |||
107 | 118 | | |
108 | 119 | | |
109 | 120 | | |
110 | | - | |
| 121 | + | |
111 | 122 | | |
112 | 123 | | |
113 | 124 | | |
114 | 125 | | |
115 | 126 | | |
116 | 127 | | |
117 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
118 | 134 | | |
119 | 135 | | |
120 | 136 | | |
| |||
139 | 155 | | |
140 | 156 | | |
141 | 157 | | |
142 | | - | |
| 158 | + | |
143 | 159 | | |
144 | 160 | | |
145 | 161 | | |
146 | 162 | | |
147 | 163 | | |
148 | 164 | | |
149 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
150 | 171 | | |
151 | 172 | | |
152 | 173 | | |
| |||
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
471 | 479 | | |
472 | 480 | | |
473 | 481 | | |
474 | 482 | | |
475 | | - | |
476 | | - | |
| 483 | + | |
| 484 | + | |
477 | 485 | | |
478 | 486 | | |
479 | 487 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 19 | + | |
57 | 20 | | |
58 | 21 | | |
59 | 22 | | |
60 | 23 | | |
61 | | - | |
| 24 | + | |
62 | 25 | | |
63 | 26 | | |
64 | | - | |
| 27 | + | |
65 | 28 | | |
66 | 29 | | |
67 | 30 | | |
| |||
81 | 44 | | |
82 | 45 | | |
83 | 46 | | |
84 | | - | |
| 47 | + | |
85 | 48 | | |
86 | 49 | | |
87 | 50 | | |
88 | | - | |
| 51 | + | |
89 | 52 | | |
90 | 53 | | |
91 | | - | |
| 54 | + | |
92 | 55 | | |
93 | 56 | | |
94 | 57 | | |
| |||
117 | 80 | | |
118 | 81 | | |
119 | 82 | | |
120 | | - | |
| 83 | + | |
121 | 84 | | |
122 | 85 | | |
123 | 86 | | |
| |||
143 | 106 | | |
144 | 107 | | |
145 | 108 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | 109 | | |
151 | 110 | | |
152 | 111 | | |
| |||
189 | 148 | | |
190 | 149 | | |
191 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
192 | 159 | | |
193 | 160 | | |
194 | 161 | | |
| |||
275 | 242 | | |
276 | 243 | | |
277 | 244 | | |
278 | | - | |
| 245 | + | |
279 | 246 | | |
280 | 247 | | |
281 | 248 | | |
282 | 249 | | |
283 | | - | |
| 250 | + | |
284 | 251 | | |
285 | 252 | | |
286 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments