Commit 5fc8220
committed
Add factory-level container properties support to ShareKafkaListenerContainerFactory
Enables configuration of container properties at the factory level, following
the established pattern in other Spring Kafka container factories. This provides
a more flexible and Spring-friendly way to configure share consumer containers,
particularly for settings like explicit acknowledgment mode, without requiring
configuration through Kafka client properties.
- Add `getContainerProperties()` method to allow configuration at factory level
- Copy factory-level properties to each listener container instance during creation
- Update acknowledgment mode determination to respect factory-level settings with proper precedence
- Add integration test for factory-level explicit acknowledgment configuration
- Update documentation with factory-level configuration example
Signed-off-by: Soby Chacko <[email protected]>1 parent c102814 commit 5fc8220
File tree
3 files changed
+91
-17
lines changed- spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka
- spring-kafka/src
- main/java/org/springframework/kafka/config
- test/java/org/springframework/kafka/listener
3 files changed
+91
-17
lines changedLines changed: 10 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | 444 | | |
455 | 445 | | |
456 | | - | |
457 | | - | |
458 | | - | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
459 | 456 | | |
460 | 457 | | |
461 | 458 | | |
| |||
Lines changed: 27 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| 63 | + | |
| 64 | + | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| |||
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
119 | 131 | | |
120 | 132 | | |
121 | 133 | | |
| |||
152 | 164 | | |
153 | 165 | | |
154 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
155 | 171 | | |
| 172 | + | |
156 | 173 | | |
157 | 174 | | |
158 | 175 | | |
| |||
180 | 197 | | |
181 | 198 | | |
182 | 199 | | |
183 | | - | |
| 200 | + | |
184 | 201 | | |
185 | 202 | | |
186 | 203 | | |
| |||
189 | 206 | | |
190 | 207 | | |
191 | 208 | | |
192 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
193 | 216 | | |
194 | 217 | | |
195 | 218 | | |
196 | 219 | | |
197 | 220 | | |
198 | 221 | | |
199 | 222 | | |
| 223 | + | |
200 | 224 | | |
201 | | - | |
| 225 | + | |
202 | 226 | | |
203 | 227 | | |
204 | 228 | | |
| |||
Lines changed: 54 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
200 | 217 | | |
201 | 218 | | |
202 | 219 | | |
| |||
261 | 278 | | |
262 | 279 | | |
263 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
264 | 291 | | |
265 | 292 | | |
266 | 293 | | |
| |||
305 | 332 | | |
306 | 333 | | |
307 | 334 | | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
308 | 340 | | |
309 | 341 | | |
310 | 342 | | |
| |||
480 | 512 | | |
481 | 513 | | |
482 | 514 | | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
483 | 536 | | |
0 commit comments