Update pom.xml and AsyncTdDirectImpl.java

This commit is contained in:
Andrea Cavalli 2020-10-27 16:27:26 +01:00
parent 675234cd51
commit 7f8300fec5
2 changed files with 4 additions and 4 deletions

View File

@ -71,12 +71,12 @@
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>3.3.10.RELEASE</version>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-tools</artifactId>
<version>3.3.10.RELEASE</version>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>

View File

@ -15,7 +15,6 @@ import java.time.Duration;
import java.util.concurrent.atomic.AtomicReference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import reactor.core.publisher.EmitterProcessor;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Scheduler;
@ -29,6 +28,7 @@ public class AsyncTdDirectImpl implements AsyncTdDirect {
private final Scheduler tdScheduler = Schedulers.newSingle("TdMain");
private final Scheduler tdPollScheduler = Schedulers.newSingle("TdPoll");
private final Scheduler tdResponsesScheduler = Schedulers.newSingle("TdResponse");
private final Scheduler tdExecScheduler = Schedulers.newSingle("TdExec");
private final Scheduler tdResponsesOutputScheduler = Schedulers.boundedElastic();
private Flux<AsyncResult<TdResult<Update>>> updatesProcessor;
@ -44,7 +44,7 @@ public class AsyncTdDirectImpl implements AsyncTdDirect {
return Mono
.fromCallable(() -> TdResult.<T>of(this.td.get().execute(request)))
.subscribeOn(tdResponsesScheduler)
.publishOn(Schedulers.single());
.publishOn(tdExecScheduler);
} else {
return Mono.<TdResult<T>>create(sink -> {
try {