Dmitry Klochkov
Dmitry Klochkov

Reputation: 2635

Can I somehow get a backtrace of a message in Spring Integration?

When, for example, an exception occurres in the middle of a spring integration flow, is there any way to get a path the message have traveled before the crash happend?

Upvotes: 1

Views: 114

Answers (1)

Artem Bilan
Artem Bilan

Reputation: 121272

The message tracks its path only if @EnableMessageHistory is switched on.

Independently of error handling, Spring Integration always wraps any exception to the MessagingException which has failedMessage property.

Getting that message and analizing its MessageHistory.HEADER_NAME you get the path before an exception.

Upvotes: 1

Related Questions