From 6e5dbe88e95bb62d1050b26cf4d07eb35e0ae603 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Wed, 29 Sep 2021 11:39:38 +0200 Subject: [PATCH] Publish updates one by one --- .../td/middle/server/AsyncTdMiddleEventBusServer.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/it/tdlight/tdlibsession/td/middle/server/AsyncTdMiddleEventBusServer.java b/src/main/java/it/tdlight/tdlibsession/td/middle/server/AsyncTdMiddleEventBusServer.java index 0f3c905..7c76bd1 100644 --- a/src/main/java/it/tdlight/tdlibsession/td/middle/server/AsyncTdMiddleEventBusServer.java +++ b/src/main/java/it/tdlight/tdlibsession/td/middle/server/AsyncTdMiddleEventBusServer.java @@ -29,6 +29,7 @@ import it.tdlight.utils.BufferTimeOutPublisher; import it.tdlight.utils.MonoUtils; import java.net.ConnectException; import java.time.Duration; +import java.util.List; import org.warp.commonutils.log.Logger; import org.warp.commonutils.log.LoggerFactory; import reactor.core.publisher.Flux; @@ -363,10 +364,10 @@ public class AsyncTdMiddleEventBusServer extends AbstractVerticle { } })) .limitRate(Math.max(1, tdOptions.getEventsSize())) - .transform(normal -> new BufferTimeOutPublisher<>(normal,Math.max(1, tdOptions.getEventsSize()), - local ? Duration.ofMillis(1) : Duration.ofMillis(100), false)) + //.transform(normal -> new BufferTimeOutPublisher<>(normal,Math.max(1, tdOptions.getEventsSize()), + // local ? Duration.ofMillis(1) : Duration.ofMillis(100), false)) //.bufferTimeout(Math.max(1, tdOptions.getEventsSize()), local ? Duration.ofMillis(1) : Duration.ofMillis(100)) - //.map(List::of) + .map(List::of) .limitRate(Math.max(1, tdOptions.getEventsSize())) .map(TdResultList::new);