-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't recognize original exception when abortTransaction() failed #2981
Comments
Confirming as a bug. |
artembilan
added a commit
to artembilan/spring-kafka
that referenced
this issue
Jan 11, 2024
Fixes: spring-projects#2981 When `producer.abortTransaction()` fails, the original exception is lost * Catch an exception on `producer.abortTransaction()` and `ex.addSuppressed(abortException)` **Cherry-pick to `3.0.x`**
artembilan
added a commit
to artembilan/spring-kafka
that referenced
this issue
Jan 11, 2024
Fixes: spring-projects#2981 When `producer.abortTransaction()` fails, the original exception is lost * Catch an exception on `producer.abortTransaction()` and `ex.addSuppressed(abortException)` **Cherry-pick to `3.0.x`**
sobychacko
pushed a commit
that referenced
this issue
Jan 17, 2024
Fixes: #2981 When `producer.abortTransaction()` fails, the original exception is lost in `KafkaTemplate`. * Catch an exception on `producer.abortTransaction()` and `ex.addSuppressed(abortException)` **Cherry-pick to `3.0.x`**
sobychacko
pushed a commit
that referenced
this issue
Jan 17, 2024
Fixes: #2981 When `producer.abortTransaction()` fails, the original exception is lost in `KafkaTemplate`. * Catch an exception on `producer.abortTransaction()` and `ex.addSuppressed(abortException)` **Cherry-pick to `3.0.x`**
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If an exception occur in the below code block
producer.abortTransaction()
, the originalException e
is discarded.spring-kafka/spring-kafka/src/main/java/org/springframework/kafka/core/KafkaTemplate.java
Lines 660 to 663 in c683f31
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.
The text was updated successfully, but these errors were encountered: