Error handling on channels

Spring Integration supports synchronous as well as asynchronous message processing. In the case of synchronous processing, it is comparatively easy to handle error scenarios based on return values or by catching thrown exceptions; for asynchronous processing, things are more complicated. There are components provided by Spring, such as filters and routers, that can be used to validate message sanity and take action based on that. If it's invalid, the message can be routed to an invalid channel or a retry channel as the case may be. Apart from this, Spring provides a global error channel and capability to define custom error channels. The following points cover an appropriate error channel:

  • An error channel needs to be ...

Get Spring Integration Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.