Results 1 to 8 of 8

Thread: Header Enricher & Exceptions

Hybrid View

  1. #1

    Default Header Enricher & Exceptions

    Hi All,

    I have a header enricher that gets its value from invoking a method on a bean. This method can potentially throw an Exception. Is there any way to catch the exception and redirect to an exception channel? I didn't see any properties on the int:header-enricher tag that seem to support this. Does it need to be wrapped in an int:chain or something?

    Thanks!
    Doug

  2. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,854

    Default

    An 'error-channel' can be added at the entry point to the flow (a gateway, inbound-channel-adapter, etc).

    What do you plan to do in the case that an Exception is thrown from that method?

  3. #3

    Default

    Hi Mark,

    Thanks for the quick response. I have an int:inbound-channel-adapter but I don't see any error-channel property when I try to autocomplete. Could I be missing a namespace? Do I need to insert a gateway? In the case of an error I want to either retry after a certain delay or just log it and move on (based on the exception).

    Thanks!
    Doug

  4. #4
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,854

    Default

    Two questions:

    1. What version of Spring Integration are you using?
    2. You mean you have the simple "inbound-channel-adapter" from the core namespace? (as opposed to "file" or "jms" or similar).

    -Mark

  5. #5

    Default

    1. 2.1
    2. Correct - just the core namespace one.

    (Wow that was fast!)
    Thanks!
    Doug

  6. #6
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    ". . .In the case of an error I want to either retry after a certain delay or just log it and move on (based on the exception). . . ."

    You may want to look at this sample. This may provide you with the alternative. https://github.com/olegz/s12gx.2011/...egration/retry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •