Announcement Announcement Module
No announcement yet.
request-handler-advice-chain not recognized? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • request-handler-advice-chain not recognized?

    Hi all. So I've been trying to implement a simple example using the new advice chain feature based on the SI reference.

    Unfortunately, while the service, which simply creates a message and sends it to a service activator which then throws a MessageHandlingException, works just fine, I'm not getting any sort of retry logic, and STS isn't recognizing the <request-handler-advice-chain> element. All I get is the MessageHandlingException, when according to the reference, the task scheduler should be attempting retries.

    Here's my full context...

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns=""
    	xmlns:xsi="" xmlns:int=""

    	<int:channel id="inputChannel" />
    	<int:channel id="outputChannel">
    		<int:queue />
    	<int:service-activator input-channel="inputChannel"
    		output-channel="outputChannel" ref="messageDestroyer">
    				class="org.springframework.integration.handler.advice.RequestHandlerRetryAdvice" />
    	<bean id="messageDestroyer" class="com.cigna.examples.advice.main.MessageDestroyer" />
    Has anyone attempted to implement this component? I saw that there was an example of its use in the latest examples, but it seems like I've essentially done the same in terms of my context, and there shouldn't be anything wrong with my main class or my service activator bean class. I definitely have spring-integration-core in my POM as well.

    Any ideas?


  • #2

    For a start: <request-handler-advice-chain> is avaliable in the latest Spring Integration 2.2.GA. So, please, check that you're using correct version.

    And on the matter: by which point do you think retry doesn't work? By default RequestHandlerRetryAdvice uses RetryTemplate with explicit SimpleRetryPolicy with 3 attempts.
    To see a work of RetryTemplate just switch on logging for it:
    By the way RequestHandlerRetryAdvice has a powerful ability - 'recoveryCallback'. And there is an useful implementation out of the box: ErrorMessageSendingRecoverer.


    Take care,


    • #3
      Aha! I'm seeing the retries now. I definitely had the right version. I just figured the messages would show up by default. My mistake.

      Thanks for the help, and yeah, now that I can examine this I plan on trying out all of the different aspects of this component.