-1

I am using mongodb-queue to send the messages. To handle the errors, I'm using the separate channel which send the exceptions. When sending the exceptions, I need to retrieve the POJO.

Please let me know if you have any idea on how to do so.

svassr
  • 5,538
  • 5
  • 44
  • 63
nav
  • 3
  • 2

1 Answers1

0

You generally shouldn't be messing with the error-channel header with a header enricher - that is rarely needed; set an error-channel on the inbound endpoint. The message in the error channel will be an ErrorMessage with failedMessage and cause properties. The failedMessage is the message at the point of failure.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179