Announcement Announcement Module
Collapse
No announcement yet.
Spring integration and handling multiple errors resulted from retries Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring integration and handling multiple errors resulted from retries

    Hello,

    I have the following scenario,

    jms connection factory configured with redelivery policy (lets say try to redeliver 5 times in case of failure), so I have a queue with a jms message driven adapter, the message get transformed and then a ws outbound call to a remote soap service, I have a fault-message-resolver configured with resolveFault method overrided to place error message on an error channel, so in case of the remote service is down, the redelivery policy will try to redeliver 5 times, each time the fault resolver will be called and an error message will be placed on the error channel, so how can I make the redelivery policy retries 5 times and after that ONLY one error message and only one will be placed on the error channel ?

    I am aware that I can implement a counter and when the number of retries equals 5 I will place a message, but is there something out of the box for SI already there to do such thing?

    Thanks

  • #2
    My initial reaction is that the error-channel might just be getting in the way. In other words, you might just want to let that WS error propagate back so that the redelivery occurs. Perhaps you can then rely on a 'dead message queue' capability in the JMS provider (and have a SI adapter for that queue if you'd like)... the details depend a bit on the capabilities of your JMS provider. Does that make sense?

    Comment


    • #3
      Thanks Mark, makes perfect sense. I was wondering how would we intercept the failed message before sending it gets sent to the DLQ. I want to header-enrich the message with the failure reason?

      Comment

      Working...
      X