【发布时间】:2020-10-13 10:00:23
【问题描述】:
我正在使用 BlockHound 分析我的反应器应用程序。我的ExchangeFunction 上有一个过滤器:
@Override
public Mono<ClientResponse> filter(ClientRequest request, ExchangeFunction next) {
final ClientRequest.Builder builder = ClientRequest.from(request);
return Mono.defer(() -> next.exchange(builder.build())) //detects blocking call
.transform(reactiveUtil::contextualize)
.publishOn(Schedulers.parallel());
}
BlockHound 在next.exchange() 上检测到阻塞调用。现在既然我使用WebClient 和Netty,为什么这个调用是非阻塞的?在elastic 线程上订阅它并没有帮助。
【问题讨论】:
-
BlockHound 显示的堆栈跟踪是什么?
-
@PhilClay gist.githubusercontent.com/pandepra/…
标签: reactive-programming project-reactor reactor reactor-netty