什么是单声道

发布于 2025-01-22 20:08:34 字数 893 浏览 2 评论 0原文

我想在以下两个呼叫的情况下进行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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文