Guaranteed Web Service Request Submission

We must guarantee the sending of the web service request. The steps are as follows:

  • Try sending a request to the web service. A synchronization or asynchronous request does not matter.
  • If the service does not recognize the request for some reason (for example, the service is unavailable), we again try to perform step # 1 (i.e. there is some kind of poll).

The problem is the implementation of step # 2 (i.e. polling). This use case looks pretty common, and I think ready-made solutions should already be ready. Therefore, I expect to send only the request to the web service, and all other logic (i.e. Guaranteed Delivery) will be executed using some structure.

Do you know such solutions?

There is guaranteed delivery . The EIP template and Camel support it. But I did not find any information on how the Camel supports it, and whether this corresponds to our case.

Our requirements are Java, SOAP, open source solutions. We plan to use Apache CXF, but this is not critical.

Final words: 2 excellent answers were provided:

  • Spring Retry Brian Agnew. This is a fairly general approach that works not only with web services.
  • CXF Fault tolerance from Ashoka Nanda. The solution relates to a web service and perfectly matches our needs.

, , Brians one, , , :-) , !

+4
2

- , , Spring Retry.

, , - / . . , . , , , , . idempotency .

HTTP- - HTTP, . , . . , , . (, update-timestamp, , () .

+4

Apache-CXF , , org.apache.cxf.clustering.RetryStrategy . , : http://cxf.apache.org/docs/failoverfeature.html

cxf runtime, cxf-rt-features-clustering.jar OSGi/non-OSGi Camel.

+4

Source: https://habr.com/ru/post/1588956/


All Articles