Skip to content
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

Better exception message header for DLT #2671

Closed
ClearClean opened this issue May 2, 2023 · 1 comment · Fixed by #2672
Closed

Better exception message header for DLT #2671

ClearClean opened this issue May 2, 2023 · 1 comment · Fixed by #2672

Comments

@ClearClean
Copy link

Expected Behavior

In DeadLetter messages, the header KafkaHeaders.DLT_EXCEPTION_MESSAGE should have message from at least the root cause exception.

Current Behavior

The header KafkaHeaders.DLT_EXCEPTION_MESSAGE is always "Listener failed" which is not really useful.

Context

Since spring framework 6.0, we do not have the message from the cause chain anymore.

We can not get any useful information from this header anymore.

@garyrussell
Copy link
Contributor

Thanks for reporting; in the meantime, you should be able to find the root cause in the stack trace header.

garyrussell added a commit to garyrussell/spring-kafka that referenced this issue May 2, 2023
Resolves spring-projects#2671

With Spring Framework 6, `NestedRuntimeException.getMessage()` no longer
includes the messages for nested exceptions via the cause chain.

See spring-projects/spring-framework#25162

This means that the DLQ exception message header always contains the same
`Failed listener` message.

Find the root cause exception of the message and include its message in the
header. Ignore any nested `TimestampedException` and `LEFE` between the top
`LEFE` and the root cause; these will still appear in the stack trace.
garyrussell added a commit to garyrussell/spring-kafka that referenced this issue May 2, 2023
Resolves spring-projects#2671

With Spring Framework 6, `NestedRuntimeException.getMessage()` no longer
includes the messages for nested exceptions via the cause chain.

See spring-projects/spring-framework#25162

This means that the DLQ exception message header always contains the same
`Failed listener` message.

Find the root cause exception of the message and include its message in the
header. Ignore any nested `TimestampedException` and `LEFE` between the top
`LEFE` and the root cause; these will still appear in the stack trace.
garyrussell added a commit to garyrussell/spring-kafka that referenced this issue May 2, 2023
Resolves spring-projects#2671

With Spring Framework 6, `NestedRuntimeException.getMessage()` no longer
includes the messages for nested exceptions via the cause chain.

See spring-projects/spring-framework#25162

This means that the DLQ exception message header always contains the same
`Failed listener` message.

Find the root cause exception and include its message in the header.
Ignore any nested `TimestampedException` and `LEFE` between the top
`LEFE` and the root cause; these will still appear in the stack trace.
artembilan pushed a commit that referenced this issue May 2, 2023
Resolves #2671

With Spring Framework 6, `NestedRuntimeException.getMessage()` no longer
includes the messages for nested exceptions via the cause chain.

See spring-projects/spring-framework#25162

This means that the DLQ exception message header always contains the same
`Failed listener` message.

Find the root cause exception and include its message in the header.
Ignore any nested `TimestampedException` and `LEFE` between the top
`LEFE` and the root cause; these will still appear in the stack trace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants