project-husky / husky

Health Usability Key
https://project-husky.github.io/husky/
Eclipse Public License 1.0
15 stars 8 forks source link

Timeout Settings on Communication #129

Closed ralych closed 3 weeks ago

ralych commented 1 month ago

In the context of the swiss EPR, there is a timeout issue, which should be solved by the possibility to configure the timeout time.

  1. Create a Spring bean of the type org.apache.cxf.transports.http.configuration.HTTPClientPolicy. In this bean, set the attributes connectionRequestTimeout and/or receiveTimeout to the desired values in milliseconds, or 0 (zero) for an infinite timeout. Example using Spring Boot:
@Bean
public HTTPClientPolicy myHttpClientPolicy() {
    var policy = new HTTPClientPolicy();
    policy.setConnectionRequestTimeout(0L);
    policy.setReceiveTimeout(0L);
    return policy;
}
  1. Reference this bean in the client endpoint URL parameter httpClientPolicy, e.g.:
.to("hpd-iti58://localhost:7078/services/iti58Endpoint?secure=true&sslContextParameters=#clientSslContextParameters&httpClientPolicy=#myHttpClientPolicy")