diff --git a/pom.xml b/pom.xml
index 8c37e74..94d4046 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,7 +48,7 @@
it.tdlight
tdlight-java-bom
- 2.8.0.1
+ 2.8.0.2
pom
import
@@ -109,6 +109,12 @@
io.atomix
atomix
${atomix.version}
+
+
+ org.ow2.asm
+ asm
+
+
io.atomix
@@ -120,6 +126,11 @@
atomix-primary-backup
${atomix.version}
+
+ org.ow2.asm
+ asm
+ 9.2
+
io.projectreactor
reactor-core
diff --git a/src/main/java/it/tdlight/reactiveapi/ReactiveApiPublisher.java b/src/main/java/it/tdlight/reactiveapi/ReactiveApiPublisher.java
index 5fa3caa..3d353b6 100644
--- a/src/main/java/it/tdlight/reactiveapi/ReactiveApiPublisher.java
+++ b/src/main/java/it/tdlight/reactiveapi/ReactiveApiPublisher.java
@@ -134,14 +134,13 @@ public abstract class ReactiveApiPublisher {
return transformedFlux;
})
- .publish();
+ .publish(256);
publishedResultingEvents
// Obtain only TDLib-bound events
.filter(s -> s instanceof TDLibBoundResultingEvent>)
.map(s -> ((TDLibBoundResultingEvent>) s).action())
- .limitRate(4)
// Buffer up to 64 requests to avoid halting the event loop, throw an error if too many requests are buffered
.onBackpressureBuffer(64, BufferOverflowStrategy.ERROR)
@@ -159,7 +158,7 @@ public abstract class ReactiveApiPublisher {
.doOnError(ex -> LOG.error("Failed to receive the response for special request {}\n"
+ " The instance will be closed", function, ex))
.onErrorResume(ex -> Mono.just(new OnUpdateError(liveId, userId, new TdApi.Error(500, ex.getMessage()))))
- )
+ , 1024)
.doOnError(ex -> LOG.error("Failed to receive resulting events. The instance will be closed", ex))
.onErrorResume(ex -> Mono.just(new OnUpdateError(liveId, userId, new TdApi.Error(500, ex.getMessage()))))