-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
If an exception occur in the below code block producer.abortTransaction()
, the original Exception e
is discarded.
spring-kafka/spring-kafka/src/main/java/org/springframework/kafka/core/KafkaTemplate.java
Lines 660 to 663 in c683f31
catch (Exception e) { | |
producer.abortTransaction(); | |
throw e; | |
} |
I recently encountered this case, and I think the original was raised while processing upper line T result = callback.doInOperations(this);
.
Is there any way to know about the original exception?
If not, it would be nice add logging of the exception or rethrowing composite exception.