what is Mono.zipDelayError equal function in Flux
Asked Answered
A

0

0

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.

Affirmatory answered 20/4, 2022 at 23:5 Comment(2)
But mono will emit 1 or 0 meanwhile flux can emit many. I dont understand what you want to do. in case PS: Mono return {a} Flux return {a,b,c,d,e} how you want the matching to be like ?Stunk
{a,a},{a,b},{a,c},{a,d},{a,e} looking for thisAffirmatory

© 2022 - 2024 — McMap. All rights reserved.