Announcement Announcement Module
No announcement yet.
Passing Messages to errorChannel Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Passing Messages to errorChannel

    I'm trying to understand how to route messages to an error channel within single thread processing (i.e. all DirectChannels). I am not using a TaskExecutor, and my workflow is starting with the <xmpp-inbound-message-adapter>. From here, I'm passing the message onto transformers, header enrichers, service activators, filters, etc.

    My desire is to re-route the messages to an error channel anytime exceptions occur, but I'm having problems understanding how to do this.

    For example, the first step after receiving an XMPP message is to send the message to a transformer. This transformer has it's normal inbound/outbound channels defined via XML. However, if something goes wrong with the transformation, I'd like to re-route the message to the global errorChannel. I tried doing this by setting the MessageHeaders.REPLY_CHANNEL to "errorChannel". I also tried setting the MessageHeaders.ERROR_CHANNEL to "errorChannel" as well with no luck. Creating and throwing an exception doesn't allow for the message to end up in the errorChannel either. In all cases (except for when the exception was thrown) it seems the transformer continues to forward the message onto it's pre-configured outbound channel.

    How do I get messages into the error channel?

  • #2
    Unfortunately it was not possible at the time when you posted this message, however we do agree that such functionality must be provided especially since it is supported with other inbound adapters.
    This resulted in which is about to be resolved and should be available in tonight's nightly build and in the Spring Integration 2.0.1 release which should come out shortly.

    Thank you for reporting it.


    • #3
      Thanks for resolving this issue so quickly.