问题
I have channel with queue and it has several messages. All of them should go to the remote system via http-outbound-gateway
If remote system is not available where do my message go? To the nowhere? How can I retry later? Does there is something like "error-channel" for http-outbound-gateway?
PS: I found way I probably like: using transactional chain + PseudoTransactionManager. It works. But could I do it with less XML?
回答1:
See this biog post and the associated sample for using the MessageHandlerRetryAdvice...
http://spring.io/blog/2012/10/09/what-s-new-in-spring-integration-2-2-part-4-retry-and-more
After the retries as exhausted you can send the message to a <delayer/>
and then send it through again.
来源:https://stackoverflow.com/questions/13753476/spring-integration-best-way-to-implement-retry-for-remote-http-calls