Skip to content

Deprecate exchangeTimeout and refactor readTimeout in ReactorClientHttpRequestFactory #33782

@rstoyanchev

Description

@rstoyanchev

The exchangeTimeout and readTimeout are used where it's necessary to call Mono.block() to avoid indefinite blocking, but Reactor Netty has a variety of timeout configuration options underneath, and such higher level timeouts get in the way, if they are shorter, creating a confusing out of the box experience and overall configuration model.

The point of blocking is not necessarily the best place to set up timeouts. The exchangeTimeout timeout for example is not the full exchange as it sounds, but only to the point of getting the ClientHttpResponse. The readTimeout blocks on the aggregation of the response, the response shouldn't be aggregated, see #33781, and more importantly Reactor Netty also has readTimeout options that aren't the same thing, it's confusing for use to re-use the same name.

Rather than add timeout options, we should rely on the underlying client to provide that. It is in a much better position to do so, and for anything missing, it's better to add that in Reactor Netty. At best we should help to configure options on the underlying client, like we do for connectTimeout.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions