From 379a798d37b19ee5c901fc3180e6ea5d89b1ea0f Mon Sep 17 00:00:00 2001 From: Wzy19930507 <1208931582@qq.com> Date: Wed, 28 Feb 2024 13:11:09 +0800 Subject: [PATCH 1/2] Non-Blocking Retries cannot combine with container transactions. * docs `transactions.adoc` and `retrytopic.adoc` --- .../src/main/antora/modules/ROOT/pages/kafka/transactions.adoc | 3 +++ .../src/main/antora/modules/ROOT/pages/retrytopic.adoc | 1 + 2 files changed, 4 insertions(+) diff --git a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/transactions.adoc b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/transactions.adoc index 9bf7b81a96..acd06fd72e 100644 --- a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/transactions.adoc +++ b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/transactions.adoc @@ -79,6 +79,9 @@ Instead, use a `KafkaTransactionManager` in the container to start the Kafka tra See xref:tips.adoc#ex-jdbc-sync[Examples of Kafka Transactions with Other Transaction Managers] for an example application that chains JDBC and Kafka transactions. +IMPORTANT: xref:retrytopic.adoc[Non-Blocking Retries] cannot combine with xref:kafka/transactions.adoc#container-transaction-manager[Container Transactions]. +When listener code threw exception, container transactions commit success and record sending to the retryable topic. + [[kafkatemplate-local-transactions]] == `KafkaTemplate` Local Transactions diff --git a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/retrytopic.adoc b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/retrytopic.adoc index 08d02f3f2f..67dc567a9b 100644 --- a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/retrytopic.adoc +++ b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/retrytopic.adoc @@ -9,3 +9,4 @@ Since 2.7 Spring for Apache Kafka offers support for that via the `@RetryableTop IMPORTANT: Non-blocking retries are not supported with xref:kafka/receiving-messages/listener-annotation.adoc#batch-listeners[Batch Listeners]. +IMPORTANT: Non-Blocking Retries cannot combine with xref:kafka/transactions.adoc#container-transaction-manager[Container Transactions]. From 40059eb67f4d6d7f16d672bdd61595b431da9bee Mon Sep 17 00:00:00 2001 From: Wzy19930507 <1208931582@qq.com> Date: Wed, 28 Feb 2024 23:22:58 +0800 Subject: [PATCH 2/2] use present tense. --- .../src/main/antora/modules/ROOT/pages/kafka/transactions.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/transactions.adoc b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/transactions.adoc index acd06fd72e..aae4b186c4 100644 --- a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/transactions.adoc +++ b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/transactions.adoc @@ -80,7 +80,7 @@ Instead, use a `KafkaTransactionManager` in the container to start the Kafka tra See xref:tips.adoc#ex-jdbc-sync[Examples of Kafka Transactions with Other Transaction Managers] for an example application that chains JDBC and Kafka transactions. IMPORTANT: xref:retrytopic.adoc[Non-Blocking Retries] cannot combine with xref:kafka/transactions.adoc#container-transaction-manager[Container Transactions]. -When listener code threw exception, container transactions commit success and record sending to the retryable topic. +When the listener code throws an exception, container transaction commit succeeds, and the record is sent to the retryable topic. [[kafkatemplate-local-transactions]] == `KafkaTemplate` Local Transactions