Skip to content

Commit debd109

Browse files
committed
Fix send offest to tx, when no active tx
Signed-off-by: moonyoungCHAE <xpf_fl@naver.com>
1 parent 17fe0ff commit debd109

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spring-kafka/src/main/java/org/springframework/kafka/listener/KafkaMessageListenerContainer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3080,6 +3080,9 @@ else if (!this.autoCommit && (!this.isAnyManualAck || commitRecovered)) {
30803080
}
30813081

30823082
private void sendOffsetsToTransaction() {
3083+
if (!TransactionSynchronizationManager.isActualTransactionActive()) {
3084+
return;
3085+
}
30833086
handleAcks();
30843087
Map<TopicPartition, OffsetAndMetadata> commits = buildCommits();
30853088
this.commitLogger.log(() -> "Sending offsets to transaction: " + commits);

0 commit comments

Comments
 (0)