什么是单声道
我想在以下两个呼叫的情况下进行triger,并将单声道和磁通结合在一起。
Mono<EmpAddressDetail> empAddDetail = getTimeoutDuration()
.flatMapDelayError(duration -> timeoutWrappedEmpDetailFlux(Service.getemeEmpAddress(empno),
duration, Exception.ErrorCode.TIMED_OUT), CONCURRENCY, PREFETCH);
Flux<Employee> empInfo= getTimeoutDuration()
.flatMap(duration -> mapEmpTypes(empTypes)
.map(empTypedata -> Tuples.of(duration, empTypedata)))
.flatMapDelayError(durationEmpTuple -> getEmpdetails(empno, durationBusinessTuple.getT1(), durationEmpTuple.getT2())
.filter(empdetails -> requestTypes.contains(empdetails.getType()))
.doOnNext(empdetails -> empdetails.setEmpId(empno)), CONCURRENCY, PREFETCH);
尝试了zipdelayerror尝试,但在不将我的磁通物体转换为单声道的情况下看起来替代。我们是否有任何通量的方法来平行调用并合并结果。
I want to Triger the below two calls parallelly and combine the Mono and flux.
Mono<EmpAddressDetail> empAddDetail = getTimeoutDuration()
.flatMapDelayError(duration -> timeoutWrappedEmpDetailFlux(Service.getemeEmpAddress(empno),
duration, Exception.ErrorCode.TIMED_OUT), CONCURRENCY, PREFETCH);
Flux<Employee> empInfo= getTimeoutDuration()
.flatMap(duration -> mapEmpTypes(empTypes)
.map(empTypedata -> Tuples.of(duration, empTypedata)))
.flatMapDelayError(durationEmpTuple -> getEmpdetails(empno, durationBusinessTuple.getT1(), durationEmpTuple.getT2())
.filter(empdetails -> requestTypes.contains(empdetails.getType()))
.doOnNext(empdetails -> empdetails.setEmpId(empno)), CONCURRENCY, PREFETCH);
tried with Mono.zipDelayError but looking alternate in flux without converting my flux object into mono. do we have any method in flux for Triger the parallel call and merge the result.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论