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
Copy file name to clipboardExpand all lines: src/reference/asciidoc/kafka.adoc
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -243,7 +243,12 @@ Spring for Apache Kafka adds support in several ways.
243
243
Transactions are enabled by providing the `DefaultKafkaProducerFactory` with a `transactionIdPrefix`.
244
244
In that case, instead of managing a single shared `Producer`, the factory maintains a cache of transactional producers.
245
245
When the user `close()` s a producer, it is returned to the cache for reuse instead of actually being closed.
246
-
The `transactional.id` property of each producer is `transactionIdPrefix` + `n`, where `n` starts with `0` and is incremented for each new producer.
246
+
The `transactional.id` property of each producer is `transactionIdPrefix` + `n`, where `n` starts with `0` and is incremented for each new producer, unless the transaction is started by a listener container with a record-based listener.
247
+
In that case, the `transactional.id` is `<transactionIdPrefix>.<group.id>.<topic>.<partition>`; this is to properly support fencing zombies https://www.confluent.io/blog/transactions-apache-kafka/[as described here].
248
+
This new behavior was added in versions 1.3.7, 2.0.6, 2.1.10, and 2.2.0.
249
+
If you wish to revert to the previous behavior, set the `producerPerConsumerPartition` property on the `DefaultKafkaProducerFactory` to `false`.
250
+
251
+
NOTE: While transactions are supported with batch listeners, zombie fencing cannot be supported because a batch may contain records from multiple topics/partitions.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/whats-new.adoc
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -28,3 +28,9 @@ See <<testing>> for more information.
28
28
29
29
Starting with _version 2.0.5_, a new `AfterRollbackProcessor` strategy is provided - see <<after-rollback>> for more information.
30
30
31
+
==== Transactional Id
32
+
33
+
When a transaction is started by the listener container, the `transactional.id` is now the `transactionIdPrefix` appended with `<group.id>.<topic>.<partition>`.
34
+
This is to allow proper fencing of zombies https://www.confluent.io/blog/transactions-apache-kafka/[as described here].
0 commit comments