Skip to content

Commit a108a33

Browse files
committed
add kafka tx manager null check
. Signed-off-by: moonyougnCHAE <[email protected]>
1 parent 41f7f31 commit a108a33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3080,7 +3080,7 @@ else if (!this.autoCommit && (!this.isAnyManualAck || commitRecovered)) {
30803080
}
30813081

30823082
private void sendOffsetsToTransaction() {
3083-
if (this.kafkaTxManager != null && TransactionSynchronizationManager.getResource(this.kafkaTxManager.getProducerFactory()) == null) {
3083+
if (this.kafkaTxManager == null || TransactionSynchronizationManager.getResource(this.kafkaTxManager.getProducerFactory()) == null) {
30843084
return;
30853085
}
30863086
handleAcks();

0 commit comments

Comments
 (0)