edit-icon download-icon

How do I set the timeout period for HSF

Last Updated: Jan 16, 2018

Use the HSF tags methodSpecials and clientTimeout for configuration.

  • methodSpecials: Sets the timeout time (unit: ms) for a single method.
  • clientTimeout: Sets the unified timeout time (unit: ms) for all methods in the API.

The timeout time settings are sorted in descending order of priority as follows:

methodSpecials for the Consumer > clientTimeout for the Consumer > methodSpecials for the Provider > clientTimeout for the Provider

An example of the Consumer tag settings is described as follows:

<hsf:consumer id="service" interface="com.taobao.edas.service.SimpleService"
version="1.1.0" group="test1" clientTimeout="3000"
target="" maxWaitTimeForCsAddress="5000">
    <hsf:methodSpecial name="sum" timeout="2000" ></hsf:methodSpecial>
Thank you! We've received your feedback.