You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Simplify whats-new.adoc and move detailed migration guide to ref docs
- Remove try-catch around `getConfigurationProperties()` - let it fail if not implemented
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
**If you set `share.acknowledgement.mode=implicit` in the factory configuration** (via `ConsumerConfig.SHARE_ACKNOWLEDGEMENT_MODE_CONFIG`), note that in 4.0 this setting had no effect because the container always called `consumer.acknowledge()` regardless.
550
+
In 4.1, the container detects this conflict, logs a warning, and overrides the factory setting with explicit mode.
551
+
To use Kafka client implicit mode, set it explicitly on the container:
Copy file name to clipboardExpand all lines: spring-kafka-docs/src/main/antora/modules/ROOT/pages/whats-new.adoc
+4-53Lines changed: 4 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,59 +17,10 @@ See xref:kafka/receiving-messages/listener-annotation.adoc[`@KafkaListener` Anno
17
17
[[x41-share-ack-mode]]
18
18
=== Share Consumer Acknowledgment Modes
19
19
20
-
The boolean `setExplicitShareAcknowledgment(boolean)` property on `ContainerProperties` has been replaced by the `ShareAckMode` enum, which clearly names the three distinct acknowledgment modes:
21
-
22
-
* `EXPLICIT` (default) — Container-managed.
23
-
The container sends `ACCEPT` after successful processing and delegates error handling to the `ShareConsumerRecordRecoverer` (default: `REJECT`).
24
-
This is the analogue of disabling `auto.commit` on a regular consumer.
25
-
* `MANUAL` — Listener-managed.
26
-
The listener must acknowledge each record via the provided `ShareAcknowledgment`.
27
-
Subsequent polls are blocked until all records from the previous poll are acknowledged.
28
-
* `IMPLICIT` — Kafka client implicit mode.
29
-
The broker auto-accepts all records regardless of processing outcome.
The deprecated `setExplicitShareAcknowledgment(true)` maps to `MANUAL`; `setExplicitShareAcknowledgment(false)` maps to `EXPLICIT`.
39
-
See xref:kafka/kafka-queues.adoc#share-record-acknowledgment[Record Acknowledgment] for the full reference.
40
-
41
-
==== Migration Guide
42
-
43
-
**Default behavior is unchanged.**
44
-
The old `setExplicitShareAcknowledgment(false)` default was already container-managed acknowledgment (the container sent `ACCEPT` on success), which is exactly what `ShareAckMode.EXPLICIT` does.
45
-
No action is required for applications using the default.
46
-
47
-
**If you used `setExplicitShareAcknowledgment(true)`**, replace it:
**If you set `share.acknowledgement.mode=implicit` in the factory configuration** (via `ConsumerConfig.SHARE_ACKNOWLEDGEMENT_MODE_CONFIG`), this is a breaking change.
59
-
In 4.0 this setting had no effect because the container always called `consumer.acknowledge()` regardless, which would have thrown `IllegalStateException` in true Kafka implicit mode.
60
-
In 4.1, the container detects this conflict and logs a warning, then overrides the factory setting with explicit mode.
61
-
To genuinely use Kafka client implicit mode — where the broker auto-accepts all records regardless of processing outcome — you must now opt in explicitly:
In `ShareAckMode.IMPLICIT`, the `ShareConsumerRecordRecoverer` is not consulted and processing errors do not influence acknowledgment.
71
-
Records are always ACCEPTed by the broker.
72
-
====
20
+
The boolean `setExplicitShareAcknowledgment(boolean)` property on `ContainerProperties` has been replaced by the `ShareAckMode` enum (`EXPLICIT`, `MANUAL`, `IMPLICIT`).
21
+
The deprecated method still works: `true` maps to `MANUAL`, `false` maps to `EXPLICIT`.
22
+
Default behavior is unchanged — applications using the default require no migration.
23
+
See xref:kafka/kafka-queues.adoc#share-record-acknowledgment[Record Acknowledgment] for mode descriptions and xref:kafka/kafka-queues.adoc#share-ack-mode-migration[Migration from 4.0] for upgrade details.
0 commit comments