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-1
Original file line number
Diff line number
Diff line change
@@ -196,7 +196,12 @@ Spring for Apache Kafka adds support in several ways.
196
196
Transactions are enabled by providing the `DefaultKafkaProducerFactory` with a `transactionIdPrefix`.
197
197
In that case, instead of managing a single shared `Producer`, the factory maintains a cache of transactional producers.
198
198
When the user `close()` s a producer, it is returned to the cache for reuse instead of actually being closed.
199
-
The `transactional.id` property of each producer is `transactionIdPrefix` + `n`, where `n` starts with `0` and is incremented for each new producer.
199
+
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.
200
+
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].
201
+
This new behavior was added in versions 1.3.7, 2.0.6, 2.1.10, and 2.2.0.
202
+
If you wish to revert to the previous behavior, set the `producerPerConsumerPartition` property on the `DefaultKafkaProducerFactory` to `false`.
203
+
204
+
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
+5
Original file line number
Diff line number
Diff line change
@@ -46,3 +46,8 @@ Starting with _version 1.3.5_, a new `AfterRollbackProcessor` strategy is provid
46
46
47
47
Support for configuring Kerberos is now provided.
48
48
See <<kerberos>> for more information.
49
+
50
+
==== Transactional Id
51
+
52
+
When a transaction is started by the listener container, the `transactional.id` is now the `transactionIdPrefix` appended with `<group.id>.<topic>.<partition>`.
53
+
This is to allow proper fencing of zombies https://www.confluent.io/blog/transactions-apache-kafka/[as described here].
0 commit comments