Skip to content

Commit fe92510

Browse files
committed
fixup! STF-322: Document transport-failure retry in README and CHANGELOG
1 parent 5afdb6c commit fe92510

1 file changed

Lines changed: 18 additions & 22 deletions

File tree

README.md

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -112,31 +112,27 @@ See the API documentation for more details.
112112

113113
### Connection pooling and transport retries ###
114114

115-
`WebServiceClient` is thread-safe and reuses a pooled `HttpClient` across
116-
requests. Idle connections in the pool can be silently closed by load
117-
balancers or other intermediaries. When the next request reuses one of these
118-
half-closed connections, the JDK reports the failure as a `Connection reset`,
119-
`Broken pipe`, or related transport `IOException`.
120-
121-
To smooth over these intermittent transport failures, the SDK retries once
122-
by default. Any transport-level `IOException` raised by the underlying HTTP
123-
send is retried, with the following exclusions:
124-
125-
* `HttpTimeoutException` — a request-phase timeout. Connect-phase timeouts
126-
(`HttpConnectTimeoutException`) are also excluded because they extend
127-
`HttpTimeoutException`. The SDK honors the timeouts you configure.
128-
* `InterruptedIOException` — the calling thread was interrupted; the SDK
129-
honors the cancellation rather than override it.
130-
* Typically deterministic failures: `UnknownHostException`,
115+
`WebServiceClient` reuses pooled HTTP connections for performance. Idle
116+
connections can be silently closed by load balancers or other
117+
intermediaries; when the next request reuses such a half-closed connection,
118+
the JDK reports the failure as a `Connection reset`, `Broken pipe`, or
119+
similar transport error.
120+
121+
To smooth over these intermittent failures, the SDK retries once by
122+
default. Most transport-level `IOException`s are retried; the SDK does
123+
**not** retry:
124+
125+
* **Timeouts** (`HttpTimeoutException`, including connect-phase timeouts).
126+
The SDK honors the timeouts you configure rather than extending them.
127+
* **Cancellation** (`InterruptedIOException`, or any interrupt observed
128+
before the request runs).
129+
* **Typically deterministic failures**`UnknownHostException`,
131130
`ConnectException`, `SSLHandshakeException`, `SSLPeerUnverifiedException`.
132131
Retrying these would just delay surfacing a config bug.
133-
* If the calling thread is already interrupted when the predicate runs, the
134-
retry is short-circuited regardless of the exception type.
135132

136-
HTTP 4xx and 5xx responses are not retried — they are returned as
137-
`HttpResponse` objects (not `IOException`s) and surfaced through the existing
138-
exception hierarchy. POST bodies are replayable, so retried requests are
139-
byte-identical to the original.
133+
HTTP 4xx and 5xx responses are surfaced through the existing exception
134+
hierarchy and are never retried. Request bodies are replayable, so retried
135+
requests are byte-identical to the original.
140136

141137
You can change the retry budget via the builder:
142138

0 commit comments

Comments
 (0)