Update EventBusFlux.java

This commit is contained in:
Andrea Cavalli 2021-01-23 11:00:41 +01:00
parent d093b680f8
commit 8137067edf

View File

@ -98,7 +98,9 @@ public class EventBusFlux {
.flatMap(item -> Mono.<Message<T>>create(itemSink -> {
var responseHandler = MonoUtils.toHandler(itemSink);
eventBus.request(subscriptionAddress + ".signal", SignalMessage.<T>onNext(item), signalDeliveryOptions, responseHandler);
})).subscribe(response -> {}, error -> {
}))
.subscribeOn(Schedulers.single())
.subscribe(response -> {}, error -> {
if (error instanceof ReplyException) {
var errorMessageCode = ((ReplyException) error).failureCode();
// -1 == NO_HANDLERS
@ -309,7 +311,9 @@ public class EventBusFlux {
}
}
})))
.subscribeOn(Schedulers.single())
.subscribeOn(Schedulers.boundedElastic())
.onBackpressureBuffer()
.publishOn(Schedulers.single())
.subscribe(v -> {}, emitter::error);
emitter.onDispose(() -> {