Publish updates one by one

This commit is contained in:
Andrea Cavalli 2021-09-29 11:39:38 +02:00
parent 41ae390f62
commit 6e5dbe88e9
1 changed files with 4 additions and 3 deletions

View File

@ -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);